Advertisement
Guest User

Untitled

a guest
Mar 20th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.41 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  
  5. Template Name: Home page
  6.  
  7.  
  8.  
  9. */
  10.  
  11.  
  12.  
  13. ?>
  14.  
  15.  
  16.  
  17. <?php get_header(); ?>
  18.  
  19.  
  20.  
  21. <?php get_sidebar(); ?>
  22.  
  23.  
  24.  
  25. <div id="centrecontent" class="column">
  26.  
  27.  
  28.  
  29. <!-- breadcrumbs -->
  30.  
  31.  
  32.  
  33. <div id="path">
  34.  
  35.  
  36.  
  37. <?php
  38.  
  39.  
  40.  
  41. if(function_exists('bcn_display'))
  42.  
  43.  
  44.  
  45. {
  46.  
  47.  
  48.  
  49. bcn_display();
  50.  
  51.  
  52.  
  53. }
  54.  
  55.  
  56.  
  57. ?>
  58.  
  59.  
  60.  
  61. </div>
  62.  
  63.  
  64.  
  65. <div id="home-left">
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. <?php if (have_posts()): while (have_posts()) : the_post(); ?>
  74.  
  75.  
  76.  
  77. <?php the_content(); ?>
  78.  
  79.  
  80.  
  81. <?php endwhile; endif; ?>
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89. <!-- Via WP Posts in category Homeboxes -->
  90.  
  91.  
  92.  
  93. <?php
  94.  
  95.  
  96.  
  97. global $post;
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. //$homeboxes = get_post_meta($post->ID, "homeboxes", $single = true);
  106.  
  107. $homeboxes = get_option('Pasw_HomeBoxes');
  108.  
  109. //$ultimecomunicazioni = get_post_meta($post->ID, "ultimecomunicazioni", $single = true);
  110.  
  111.  
  112.  
  113. $homeboxes = get_option('Pasw_HomeBoxes');
  114.  
  115. $ultimecomunicazioni = get_option('Pasw_Comunicazioni');
  116.  
  117. $inevidenza = get_option('Pasw_InEvidenza');
  118.  
  119.  
  120.  
  121. if(($homeboxes) != ""){
  122.  
  123. $homepostsID = explode(',', $homeboxes);
  124.  
  125. foreach($homepostsID as $postID){
  126.  
  127. $post = get_post($postID);
  128.  
  129. echo '<h2>'.$post->post_title.'</h2>
  130.  
  131. '.$post->post_content;
  132.  
  133. }
  134.  
  135. }
  136.  
  137.  
  138.  
  139.  
  140.  
  141. ?>
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157. <!-- Via Text Snippets -->
  158.  
  159.  
  160.  
  161. <!--
  162.  
  163.  
  164.  
  165. <?php // this will not work if you don't have the plugin installed, so it's commented out ?>
  166.  
  167.  
  168.  
  169. <?php // get_textsnippet(1);?>
  170.  
  171.  
  172.  
  173. <?php // get_textsnippet(2);?>
  174.  
  175.  
  176.  
  177. -->
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185. </div>
  186.  
  187.  
  188.  
  189. <div id="home-right">
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197. <?php
  198.  
  199.  
  200.  
  201. if(($inevidenza) != "") :
  202.  
  203.  
  204.  
  205. ?>
  206.  
  207.  
  208.  
  209. <h2>News</h2>
  210.  
  211.  
  212.  
  213. <?php
  214.  
  215.  
  216.  
  217. global $post;
  218.  
  219.  
  220.  
  221. $myposts = get_posts('numberposts=3&category='.$inevidenza);
  222.  
  223.  
  224.  
  225. foreach($myposts as $post) :
  226.  
  227.  
  228.  
  229. setup_postdata($post);
  230.  
  231.  
  232.  
  233. global $more;
  234.  
  235.  
  236.  
  237. $more = 0;
  238.  
  239.  
  240.  
  241. ?>
  242.  
  243.  
  244.  
  245. <h3><?php the_time('j M y') ?> - <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
  246.  
  247.  
  248.  
  249. <?php the_excerpt(); ?>
  250.  
  251.  
  252.  
  253. <?php endforeach; ?>
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. MODIFICATO------->>>> <p class="dx"><a href="index.php/news/">Tutte le news...</a></p>
  262. QUI HO AGGIUNTO index.php/ DAVANTI A news
  263.  
  264.  
  265.  
  266. <?php
  267.  
  268.  
  269.  
  270. endif;
  271.  
  272.  
  273.  
  274. ?>
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286. <?php
  287.  
  288.  
  289.  
  290. if(($ultimecomunicazioni) != "") :
  291.  
  292.  
  293.  
  294. ?>
  295.  
  296.  
  297.  
  298. <h2>Ultime circolari</h2>
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306. <?php
  307.  
  308.  
  309.  
  310. global $post;
  311.  
  312.  
  313.  
  314. $myposts = get_posts('numberposts=5&category='.$ultimecomunicazioni);
  315.  
  316.  
  317.  
  318. foreach($myposts as $post) :
  319.  
  320.  
  321.  
  322. setup_postdata($post);
  323.  
  324.  
  325.  
  326. global $more;
  327.  
  328.  
  329.  
  330. $more = 0;
  331.  
  332.  
  333.  
  334. ?>
  335.  
  336.  
  337.  
  338. <h3><?php the_time('j M y') ?> - <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
  339.  
  340.  
  341.  
  342. <?php the_excerpt(); ?>
  343.  
  344.  
  345.  
  346. <?php endforeach; ?>
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354. MODIFICATO ------>>> <p class="dx"><a href="index.php/circolari/">Tutte le circolari...</a></p>
  355. ANCHE QUI HO AGGIUNTO index.php/ ALL'ORIGINALE
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363. <?php
  364.  
  365.  
  366.  
  367. endif;
  368.  
  369.  
  370.  
  371. ?>
  372.  
  373. <h2>Prossimi eventi</h2>
  374.  
  375.  
  376.  
  377. <?php
  378.  
  379.  
  380.  
  381. ec3_get_events(
  382.  
  383.  
  384.  
  385. 5, // limit
  386.  
  387.  
  388.  
  389. '%DATE%: <a href="%LINK%">%TITLE%</a>', // template_event
  390.  
  391.  
  392.  
  393. '' // template_day
  394.  
  395.  
  396.  
  397. );
  398.  
  399.  
  400.  
  401. ?>
  402.  
  403.  
  404.  
  405. </div>
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413. <div id="sotto-hp">
  414.  
  415.  
  416.  
  417.  
  418.  
  419. <?php
  420.  
  421. $sidebars_widgets = wp_get_sidebars_widgets();
  422.  
  423.  
  424.  
  425. if (count($sidebars_widgets['sidebar-3'])>0) :
  426.  
  427. ?>
  428.  
  429. <div class="col-com2">
  430.  
  431. <ul>
  432.  
  433. <?php
  434.  
  435. endif;
  436.  
  437. if ( function_exists('dynamic_sidebar') && dynamic_sidebar("sottohome1") ) :
  438.  
  439. endif;
  440.  
  441. if (count($sidebars_widgets['sidebar-3'])>0) :
  442.  
  443. ?>
  444.  
  445. </ul>
  446.  
  447. </div>
  448.  
  449. <?php endif;
  450.  
  451. if (count($sidebars_widgets['sidebar-4'])>0) :
  452.  
  453. ?>
  454.  
  455. <div class="col-com2">
  456.  
  457. <ul>
  458.  
  459. <?php
  460.  
  461. endif;
  462.  
  463. if ( function_exists('dynamic_sidebar') && dynamic_sidebar("sottohome2") ) :
  464.  
  465. endif;
  466.  
  467. if (count($sidebars_widgets['sidebar-4'])>0) :
  468.  
  469. ?>
  470.  
  471. </ul>
  472.  
  473. </div>
  474.  
  475. <?php endif;
  476.  
  477.  
  478.  
  479. if (count($sidebars_widgets['sidebar-5'])>0) :
  480.  
  481. ?>
  482.  
  483. <div class="col-com2">
  484.  
  485. <ul>
  486.  
  487. <?php
  488.  
  489. endif;
  490.  
  491. if ( function_exists('dynamic_sidebar') && dynamic_sidebar("sottohome3") ) :
  492.  
  493. endif;
  494.  
  495. if (count($sidebars_widgets['sidebar-5'])>0) :
  496.  
  497. ?>
  498.  
  499. </ul>
  500.  
  501. </div>
  502.  
  503. <?php endif;?>
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511. </div>
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519. <p class="pulisci"><br /></p>
  520.  
  521.  
  522.  
  523. </div>
  524.  
  525.  
  526.  
  527. <?php include(TEMPLATEPATH . '/rightsidebar.php'); ?>
  528.  
  529.  
  530.  
  531.  
  532.  
  533. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement