Guest User

Untitled

a guest
Aug 19th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.16 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  
  5. Template Name: Site_Home
  6.  
  7. */
  8.  
  9. ?>
  10.  
  11.  
  12.  
  13. <?php get_header(); ?>
  14.  
  15. <?php $cat_tab_1 = get_option('lp_tab_cat_1');  ?>      
  16. <?php $cat_tab_2 = get_option('lp_tab_cat_2');  ?>      
  17. <?php $cat_tab_3 = get_option('lp_tab_cat_3');  ?>      
  18. <?php $post_number = get_option('lp_post_num');  ?>  
  19.  
  20.  
  21.         <div id="content">           
  22.  
  23.             <div id="content-left">
  24.  
  25.                 <!-- slide-container -->
  26.  
  27.                 <div class="slide-container">
  28.  
  29.                     <div id="slider">
  30.  
  31.                         <ul>
  32.  
  33.                             <li class="img_right"><a href="<?php echo get_option('lp_slide_link_1'); ?>"><img src="<?php echo get_option('lp_slide_img_1'); ?>" alt="slide 1"/></a></li>
  34.                             <li class="img_right"><a href="<?php echo get_option('lp_slide_link_2'); ?>"><img src="<?php echo get_option('lp_slide_img_2'); ?>" alt="slide 2"/></a></li>
  35.                             <li class="img_right"><a href="<?php echo get_option('lp_slide_link_3'); ?>"><img src="<?php echo get_option('lp_slide_img_3'); ?>" alt="slide 3"/></a></li>
  36.                             <li class="img_right"><a href="<?php echo get_option('lp_slide_link_4'); ?>"><img src="<?php echo get_option('lp_slide_img_4'); ?>" alt="slide 4"/></a></li>  
  37.  
  38.                         </ul>
  39.  
  40.                     </div>
  41.  
  42.                 </div>
  43.  
  44.                 <?php if (  get_option('lp_latest_posts') != 'true' ) { ?>
  45.  
  46.                     <ul class="tabs">
  47.  
  48.                         <li><a href="#tab1"><?php echo stripslashes ($cat_tab_1) ?></a></li>
  49.  
  50.                         <li><a href="#tab2"><?php echo stripslashes ($cat_tab_2) ?></a></li>
  51.                        
  52.                         <li><a href="#tab3"><?php echo stripslashes ($cat_tab_3) ?></a></li>
  53.  
  54.                     </ul>
  55.                    
  56.  
  57.                     <!-- tab-container -->
  58.  
  59.                     <div class="tab_container">
  60.  
  61.                         <!-- tab-content begin -->
  62.  
  63.                         <div id="tab1" class="tab_content">
  64.                             <?php query_posts("category_name=$cat_tab_1&showposts=4"); ?>
  65.                             <?php while (have_posts()) : the_post(); ?>
  66.                             <ul class="tab-post">
  67.                                 <li>
  68.                                     <div class="date left"><?php the_time('M j'); ?></div>
  69.                                     <h4 class="post-title event-post left"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
  70.                                     <div class="clear"></div>
  71.                                 </li>
  72.                             </ul>
  73.                             <?php endwhile;?>
  74.                         </div>
  75.  
  76.  
  77.                         <div id="tab2" class="tab_content">
  78.                             <?php query_posts("category_name=$cat_tab_2&showposts=4"); ?>
  79.                             <?php while (have_posts()) : the_post(); ?>
  80.                             <ul class="tab-post">
  81.                                 <li>
  82.                                     <div class="date left"><?php the_time('M j'); ?></div>
  83.                                     <h4 class="post-title event-post left"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
  84.                                     <div class="clear"></div>
  85.                                 </li>
  86.                             </ul>
  87.                             <?php endwhile;?>
  88.                         </div>
  89.  
  90.  
  91.                         <div id="tab3" class="tab_content">
  92.                             <?php query_posts("category_name=$cat_tab_3&showposts=4"); ?>
  93.                             <?php while (have_posts()) : the_post(); ?>
  94.                             <ul class="tab-post">
  95.                                 <li>
  96.                                     <div class="date left"><?php the_time('M j'); ?></div>
  97.                                     <h4 class="post-title event-post left"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
  98.                                     <div class="clear"></div>
  99.                                 </li>
  100.                             </ul>
  101.                             <?php endwhile;?>
  102.                         </div>
  103.  
  104.  
  105.                         <!-- tab-content end -->
  106.  
  107.                     </div>
  108.  
  109.                 <?php } else { ?>
  110.  
  111.                     <div id="main-content">
  112.  
  113.                         <?php query_posts("showposts=$post_number"); ?>
  114.  
  115.                         <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  116.  
  117.                         <div class="post">                                                                         
  118.  
  119.                             <h2 class="line"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  120.  
  121.                             <?php the_post_thumbnail(); ?>
  122.  
  123.                             <?php the_excerpt(); ?>
  124.  
  125.                             <p class="meta"><?php the_time('F j, Y'); ?> in <?php the_category(', '); ?> by <?php the_author_posts_link() ?></p>
  126.  
  127.                             <p class="meta"><?php comments_popup_link('No comments yet', '1 comment', '% comments', '', 'Comments are disabled for this post'); ?></p>         
  128.  
  129.                         </div>
  130.  
  131.                         <!--/box-->  
  132.  
  133.                         <?php endwhile; else: ?>
  134.  
  135.                         <h2>404 - Not Found</h2>
  136.  
  137.                         <p>The page you are looking for is not here.</p>                     
  138.  
  139.                         <?php endif; ?>
  140.  
  141.                     </div>
  142.  
  143.                 <?php } ?>
  144.  
  145.             </div>
  146.  
  147.             <div id="content-right"><?php get_sidebar('home'); ?></div>
  148.  
  149.         </div>
  150.  
  151.         <!--content end-->
  152.  
  153.         <!--Popup window-->
  154.  
  155.         <?php include(TEMPLATEPATH.'/popup.php') ?>
  156.  
  157.     </div>
  158.  
  159.     <!--main end-->
  160.  
  161. </div>
  162.  
  163. <!--wrapper end-->
  164.  
  165. <div class="clear"></div>      
  166.  
  167. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment