Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <pre>
- <?php
- global $post;
- $all_events = tribe_get_events(
- array(
- 'eventDisplay' => 'upcoming',
- 'posts_per_page' => 5,
- 'tax_query' => array(array(
- 'taxonomy' => TribeEvents::TAXONOMY,
- 'field' => 'slug',
- 'terms' => 'my-category'
- ))
- )
- );
- foreach($all_events as $post) {
- setup_postdata($post);
- echo get_the_title() . "\n";
- echo tribe_get_start_date(null, true, 'M j, Y') . "\n\n";
- }
- ?>
- </pre>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement