Advertisement
Guest User

events calendar category

a guest
May 22nd, 2012
680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. <?php
  2.     $pTitle = get_the_title();
  3.     $today = date('Y-m-d');
  4.     query_posts(array('tribe_events_cat' => $pTitle,
  5.                     'showposts' => 5,
  6.                     'post_type' => 'tribe_events',
  7.                     'meta_key' => '_EventEndDate',
  8.                     'orderby' => 'meta_value',
  9.                     'order' => 'ASC',
  10.                          'meta_query' => array(
  11.                         array(
  12.                         'key' => '_EventEndDate',
  13.                         'meta-value' => $value,
  14.                         'value' => $today,
  15.                         'compare' => '>=',
  16.                         'type' => 'CHAR'
  17.                         )
  18.                     )
  19.                     ));
  20.                      ?>  
  21.     <ul>
  22.     <?php while (have_posts()) : the_post(); ?>  
  23.        
  24.             <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
  25.     <?php endwhile; ?>  
  26.     </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement