Advertisement
frenchtowner

Events Calendar Category Page

May 7th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: City-County Page
  4. */
  5. get_header();
  6. global $woo_options;
  7. ?>
  8.  
  9. <div id="content" class="page col-full">
  10. <div id="main" class="col-left">
  11.  
  12. <?php if (have_posts()) : $count = 0; ?>
  13. <?php while (have_posts()) : the_post(); $count++; ?>
  14.  
  15. <div <?php post_class(); ?>>
  16.  
  17. <div class="entry">
  18. <?php the_content(); ?>
  19. <?php
  20. $pTitle = get_the_title();
  21. $today = date('Y-m-d');
  22. query_posts(array('tribe_events_cat' => 1255,
  23. 'showposts' => 5,
  24. 'post_type' => 'tribe_events',
  25. 'meta_key' => '_EventEndDate',
  26. 'orderby' => 'meta_value',
  27. 'order' => 'ASC',
  28. 'meta_query' => array(
  29. array(
  30. 'key' => '_EventEndDate',
  31. 'meta-value' => $value,
  32. 'value' => $today,
  33. 'compare' => '>=',
  34. 'type' => 'CHAR'
  35. )
  36. )
  37. ));
  38. ?>
  39. <ul>
  40. <?php while (have_posts()) : the_post(); ?>
  41.  
  42. <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
  43. <?php endwhile; ?>
  44. </ul>
  45. </div><!-- /.entry -->
  46.  
  47. </div><!-- /.post -->
  48.  
  49. <?php $comm = $woo_options[ 'woo_comments' ]; if ( ($comm == "page" || $comm == "both") ) : ?>
  50. <?php comments_template(); ?>
  51. <?php endif; ?>
  52.  
  53. <?php endwhile; else: ?>
  54. <div <?php post_class(); ?>>
  55. <p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ) ?></p>
  56. </div><!-- /.post -->
  57. <?php endif; ?>
  58.  
  59. </div><!-- /#main -->
  60.  
  61. <?php get_sidebar(); ?>
  62.  
  63. </div><!-- /#content -->
  64.  
  65. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement