Guest User

Tri.be Events Query

a guest
Oct 14th, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <?php
  2. $events = tribe_get_events(
  3.     array(
  4.         'eventDisplay'=>'upcoming',
  5.         'posts_per_page'=>-1,
  6.         'tribeHideRecurrence' =>1,
  7.         'tax_query'=> array(
  8.             array(
  9.                 'taxonomy' => $taxonomy,
  10.                 'terms' => $term->term_id,
  11.                 'field' => 'term_id'
  12.             )  
  13.         )
  14.     )
  15. );
  16. ?>
  17.  
  18. <?php if(sizeof($events) > 0): ?>
  19. <h3>Family Friendly Events:</h3>
  20. <ul class="events-list">
  21.     <?php foreach($events as $post): setup_postdata($post); ?>
  22.         <li>
  23.             <a class="url" href="<?php tribe_event_link(); ?>" title="<?php the_title() ?>" rel="bookmark">
  24.                 <?php echo $post->ID; ?>
  25.             </a>
  26.         </li>
  27.     <?php endforeach; ?>
  28. </ul>
  29. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment