Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h1>Upcoming events:</h1>
- <?php global $post;
- $upcoming = tribe_get_events( array('eventDisplay'=>'upcoming', 'posts_per_page'=>-1) );
- foreach($upcoming as $post) : setup_postdata($post);
- echo '<h3 class="clearfix"><a href="';
- the_permalink();
- echo '">';
- the_title();
- echo '</a></h3>';
- if ( has_post_thumbnail() ) {
- echo '<a href="';
- the_permalink();
- echo '"><div style="float:left;margin:0 10px 10px 0;" >';
- the_post_thumbnail('thumbnail');
- echo '</div></a>';
- the_excerpt();
- } else {
- echo the_excerpt();
- }
- endforeach; ?>
- <h1>Past events:</h1>
- <?php global $post;
- $past = tribe_get_events( array('eventDisplay'=>'past', 'posts_per_page'=>-1) );
- foreach($past as $post) : setup_postdata($post);
- echo '<h3><a href="';
- the_permalink();
- echo '">';
- the_title();
- echo '</a></h3>';
- endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement