Guest User

Recurring Events

a guest
Dec 16th, 2014
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2.  
  3. $args = tribe_get_events(
  4.     array(
  5.         'eventDisplay'=>'upcoming',
  6.         //'posts_per_page'=>3,
  7.         'meta_key'=> '_EventRecurrence',
  8.         )
  9. );
  10.  
  11. $the_query = new WP_Query($args); ?>
  12.  
  13. <?php if ( $the_query->have_posts() ) : ?>
  14.  
  15. <div class='events-recurring events-section'>
  16.     <h1 class='event-section-header'>Recurring Events</h1>
  17.     <ul>
  18.  
  19.     <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
  20.  
  21.     <li>
  22.         <div class="event-recurring-thumb">
  23.             <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
  24.             <div>
  25.                 <span class="event-recurring-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
  26.             </div>
  27.         </div>
  28.     </li>
  29.  
  30. <?php endwhile; ?>
  31. <?php wp_reset_postdata(); ?>
  32.  
  33.     </ul>
  34. </div>
  35.  
  36. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment