Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.07 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Posts
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7.  
  8. <!-- Events Calendar Starts -->
  9. <?php if (!$paged && get_option('woo_events_calendar') == 'true') include (TEMPLATEPATH . "/includes/events-calendar.php"); ?>
  10. <!-- Events Calendar Ends -->
  11.  
  12. <!-- Past Events Slider Starts -->
  13. <?php $showfeatured = get_option('woo_featured'); if ($showfeatured <> "true") { if (get_option('woo_exclude')) update_option("woo_exclude", ""); } ?>
  14. <?php if ( !$paged && $showfeatured == "true" ) include ( TEMPLATEPATH . '/includes/featured.php' ); ?>
  15. <!-- Past Events Slider Ends -->
  16.  
  17. <?php if ((get_option('woo_events_calendar') != 'true') && (get_option('woo_featured') != 'true') && (get_option('woo_blog_panel') != 'true') && (get_option('woo_footer_panel') != 'true')) { ?>
  18. <div id="content" class="col-full">
  19. <p class="note"><?php _e('Please set up your theme options for your theme to render correctly.','woothemes'); ?></p>
  20. </div>
  21. <?php } ?>
  22.  
  23. <?php if (get_option('woo_blog_panel') == 'true') { ?>
  24. <div id="content" class="col-full">
  25.  
  26. <div id="main" class="col-left">
  27. <?php if (get_option('woo_event_exclude') == 'true') { $category_id = get_cat_ID( get_option('woo_events_category') ); if ($category_id != 0) { $exclude_cat[0] = $category_id; } else { $exclude_cat[0] = ''; } } ?>
  28. <?php $i = 1; $cat_ids = explode(',',get_option('woo_blog_cat_exclude')); foreach ($cat_ids as $cat_id){ $exclude_cat[$i] = $cat_id; $i++; } ?>
  29. <?php if (get_option('woo_blog_featured_exclude') == 'true') { $exclude_posts = get_option('woo_exclude'); } ?>
  30. <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'post__not_in' => $exclude_posts, 'category__not_in' => $exclude_cat, 'paged' => $paged ); ?>
  31. <?php query_posts($args); ?>
  32. <?php if (have_posts()) : $count = 0; ?>
  33. <?php while (have_posts()) : the_post(); $count++; ?>
  34.  
  35. <div class="post">
  36.  
  37. <?php woo_get_image('image',$GLOBALS['thumb_w'],$GLOBALS['thumb_h'],'thumbnail '.$GLOBALS['thumb_align']); ?>
  38.  
  39. <h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  40.  
  41. <p class="post-meta">
  42. <span class="small"><?php _e('by', 'woothemes') ?></span> <span class="post-author"><?php the_author_posts_link(); ?></span>
  43. <span class="small"><?php _e('on', 'woothemes') ?></span> <span class="post-date"><?php the_time(get_option('date_format')); ?></span>
  44. <span class="small"><?php _e('in', 'woothemes') ?></span> <span class="post-category"><?php the_category(', ') ?></span>
  45. </p>
  46.  
  47. <?php $video = woo_embed('width=525&height=300'); ?>
  48. <?php
  49. if (!empty($video)){ ?>
  50. <div class="video <?php echo $GLOBALS['single_align']; ?>">
  51. <?php echo $video; ?>
  52. </div><!-- /.image -->
  53. <?php } ?>
  54.  
  55. <?php if ( get_option('woo_post_content_archives') == "true" ) { ?>
  56.  
  57. <div class="entry">
  58. <?php the_content(__('Read more...', 'woothemes')); ?>
  59. </div>
  60.  
  61. <div class="post-more">
  62. <div class="read-more fl"><?php comments_popup_link(__('Leave a Comment', 'woothemes'), __('Leave a Comment', 'woothemes'), __('Leave a Comment', 'woothemes')); ?></div>
  63. <div class="comments fr"><?php comments_popup_link(__('0 Comments', 'woothemes'), __('1 Comment', 'woothemes'), __('% Comments', 'woothemes')); ?></div>
  64. <div class="fix"></div>
  65. </div> <!-- /.post-more -->
  66.  
  67. <?php } else { ?>
  68.  
  69. <div class="entry">
  70. <?php the_excerpt(); ?>
  71. </div>
  72.  
  73. <div class="post-more">
  74. <div class="read-more fl"><a href="<?php the_permalink() ?>" title="<?php _e('Read full story','woothemes'); ?>"><?php _e('Read the full story','woothemes'); ?></a></div>
  75. <div class="comments fr"><?php comments_popup_link(__('0 Comments', 'woothemes'), __('1 Comment', 'woothemes'), __('% Comments', 'woothemes')); ?></div>
  76. <div class="fix"></div>
  77. </div> <!-- /.post-more -->
  78.  
  79. <?php } ?>
  80.  
  81. </div><!-- /.post -->
  82.  
  83. <?php endwhile; else: ?>
  84. <div class="post">
  85. <p><?php _e('Sorry, no posts matched your criteria.', 'woothemes') ?></p>
  86. </div><!-- /.post -->
  87. <?php endif; ?>
  88.  
  89. <?php woo_pagenav(); ?>
  90.  
  91. </div><!-- /#main -->
  92.  
  93. <?php get_sidebar('home'); ?>
  94.  
  95. </div><!-- /#content -->
  96. <?php } ?>
  97.  
  98. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement