Guest User

ECP change query for list.php - v2

a guest
Nov 6th, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1.  
  2. <?php // code to show only one of each event
  3.  
  4. $args = array(
  5. 'post_type' => 'tribe_events',
  6. 'showposts' => -1
  7. );
  8. // also tried query_posts( $args );
  9.  
  10. $evs = new WP_Query( $args );
  11.  
  12.  
  13. ?>
  14.  
  15.  
  16. <?php if ($evs->have_posts()) : ?>
  17. <?php $hasPosts = true; $first = true; ?>
  18. <?php while ($evs->have_posts()) : $evs->the_post(); ?>
  19. <?php global $more; $more = false; ?>
  20.  
  21. //loop stuff here
  22. <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment