Guest User

Untitled

a guest
Oct 22nd, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.40 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Site_Home
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8. <?php $cat_tab_1 = get_option('lp_tab_cat_1'); ?>
  9. <?php $cat_tab_2 = get_option('lp_tab_cat_2'); ?>
  10. <?php $cat_tab_3 = get_option('lp_tab_cat_3'); ?>
  11. <?php $post_number = get_option('lp_post_num'); ?>
  12.  
  13. <div id="content">
  14. <div id="content-left">
  15. <!-- slide-container -->
  16. <div id="slider-wrapper">
  17. <div id="slider" class="nivoSlider">
  18. <a href="<?php echo get_option('lp_slide_link_1'); ?>"><img src="<?php echo get_option('lp_slide_img_1'); ?>" alt="slide 1" title="<?php echo get_option('lp_slide_capt_1'); ?>"/></a>
  19. <a href="<?php echo get_option('lp_slide_link_2'); ?>"><img src="<?php echo get_option('lp_slide_img_2'); ?>" alt="slide 2" title="<?php echo get_option('lp_slide_capt_2'); ?>"/></a>
  20. <a href="<?php echo get_option('lp_slide_link_3'); ?>"><img src="<?php echo get_option('lp_slide_img_3'); ?>" alt="slide 3" title="<?php echo get_option('lp_slide_capt_3'); ?>" /></a>
  21. <a href="<?php echo get_option('lp_slide_link_4'); ?>"><img src="<?php echo get_option('lp_slide_img_4'); ?>" alt="slide 4" title="<?php echo get_option('lp_slide_capt_4'); ?>"/></a>
  22. </div>
  23. </div>
  24. <?php if ( get_option('lp_latest_posts') != 'true' ) { ?>
  25. <ul class="tabs">
  26. <li><a href="#tab1"><?php echo stripslashes ($cat_tab_1) ?></a></li>
  27. <li><a href="#tab2"><?php echo stripslashes ($cat_tab_2) ?></a></li>
  28. <li><a href="#tab3"><?php echo stripslashes ($cat_tab_3) ?></a></li>
  29. </ul>
  30. <!-- tab-container -->
  31. <div class="tab_container">
  32. <!-- tab-content begin -->
  33. <div id="tab1" class="tab_content">
  34. <?php query_posts("category_name=$cat_tab_1&showposts=4"); ?>
  35. <?php while (have_posts()) : the_post(); ?>
  36. <ul class="tab-post">
  37. <li>
  38. <div class="date left"><?php the_time('M j'); ?></div>
  39. <h4 class="post-title event-post left"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
  40. <div class="clear"></div>
  41. </li>
  42. </ul>
  43. <?php endwhile;?>
  44. </div>
  45. <div id="tab2" class="tab_content">
  46. <?php query_posts("category_name=$cat_tab_2&showposts=4"); ?>
  47. <?php while (have_posts()) : the_post(); ?>
  48. <ul class="tab-post">
  49. <li>
  50. <div class="date left"><?php the_time('M j'); ?></div>
  51. <h4 class="post-title event-post left"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
  52. <div class="clear"></div>
  53. </li>
  54. </ul>
  55. <?php endwhile;?>
  56. </div>
  57. <div id="tab3" class="tab_content">
  58. <?php query_posts("category_name=$cat_tab_3&showposts=4"); ?>
  59. <?php while (have_posts()) : the_post(); ?>
  60. <ul class="tab-post">
  61. <li>
  62. <div class="date left"><?php the_time('M j'); ?></div>
  63. <h4 class="post-title event-post left"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
  64. <div class="clear"></div>
  65. </li>
  66. </ul>
  67. <?php endwhile;?>
  68. </div>
  69. <!-- tab-content end -->
  70. </div>
  71. <?php } else { ?>
  72. <div id="main-content">
  73. <?php query_posts("showposts=$post_number"); ?>
  74. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  75. <div class="post">
  76. <h2 class="line"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  77. <?php the_post_thumbnail(); ?>
  78. <?php the_excerpt(); ?>
  79. <p class="meta"><?php the_time('F j, Y'); ?> in <?php the_category(', '); ?> by <?php the_author_posts_link() ?></p>
  80. <p class="meta"><?php comments_popup_link('No comments yet', '1 comment', '% comments', '', 'Comments are disabled for this post'); ?></p>
  81. </div>
  82. <!--/box-->
  83. <?php endwhile; else: ?>
  84. <h2>404 - Not Found</h2>
  85. <p>The page you are looking for is not here.</p>
  86. <?php endif; ?>
  87. </div>
  88. <?php } ?>
  89. </div>
  90. <div id="content-right"><?php get_sidebar('home'); ?></div>
  91. </div>
  92. <!--content end-->
  93. <!--Popup window-->
  94. <?php include(TEMPLATEPATH.'/popup.php') ?>
  95. </div>
  96. <!--main end-->
  97. </div>
  98. <!--wrapper end-->
  99. <div class="clear"></div>
  100. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment