Guest User

manual ecp query

a guest
Oct 24th, 2012
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.69 KB | None | 0 0
  1. <h1>Test Manual query</h1>
  2.  
  3.          <?php
  4.          
  5.          $tribe_events = tribe_get_events(array(
  6.             'start_date' => '2012-11-01',
  7.             'end_date' => '2012-11-31',
  8.             'posts_per_page' => 8,
  9.             'eventDisplay' => 'upcoming',
  10.             'tax_query' => array(array(
  11.                 'taxonomy' => TribeEvents::TAXONOMY,
  12.                 'field' => 'slug',
  13.                 'terms' => 'comedy'))
  14.         ));
  15.        
  16.         foreach($tribe_events as $post) {
  17.         setup_postdata($post); ?>
  18.        
  19.             <div class="upcoming_events">
  20.                 <div class="event_date">
  21.                     <span class="calendar_month"><?php echo tribe_get_start_date( $post->ID, false, 'M' ); ?></span>
  22.                     <span class="calendar_day"><?php echo tribe_get_start_date( $post->ID, false, 'd' ); ?></span>
  23.                 </div>
  24.                 <div class="event_desc">
  25.                     <h4><a href="<?php echo tribe_event_link(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
  26.                     <?php the_excerpt(); ?>
  27.                 </div><!--event desc-->
  28.                 <div class="event_meta">
  29.                     <ul>
  30.                         <li><span>Start:</span><p><?php echo tribe_get_start_date( $post->ID, true, 'm/d/y  ' ); ?></p></li>
  31.                         <li><span>End:</span><p><?php echo tribe_get_end_date( $post->ID, true, 'm/d/y  ' ); ?></p></li>
  32.                         <?php if(tribe_has_venue()){ ?><li><span>Location:</span><p><?php echo tribe_get_venue(); ?></p></li><? } ?>
  33.                         <?php if(tribe_address_exists()){ ?><li><span>Address:</span><p><?php echo tribe_get_address(); ?><br /><?php echo tribe_get_city().', '; echo tribe_get_state().' '; echo tribe_get_zip(); ?></p></li><?php } ?>
  34.                         <?php if(tribe_get_cost() != ""){ ?><li><span>Cost:</span><p><?php echo tribe_get_cost(); ?></p></li><?php } ?>
  35.                     </ul>
  36.                 </div><!--event meta-->
  37.             </div><!--upcoming events-->
  38.            
  39.        
  40.         <?php }  wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment