Skip to content

Instantly share code, notes, and snippets.

@spigotdesign
Created February 3, 2020 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spigotdesign/82be51bc09b4c4a5e688c3e488cb15df to your computer and use it in GitHub Desktop.
Save spigotdesign/82be51bc09b4c4a5e688c3e488cb15df to your computer and use it in GitHub Desktop.
<?php $efeed = new WP_Query( array(
'post_type' => 'tribe_events',
'showposts' => 2,
'eventDisplay' => 'upcoming',
'start_date' => $current_date,
'end_date' => $current_date,
'orderby' => 'start_date',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'tribe_events_cat',
'field' => 'slug',
'terms' => array('seasonal-services', 'facility-schedule'),
'operator' => 'NOT IN')
),
));
?>
<?php if ( $efeed->have_posts() ) :?>
<ul class="feed">
<?php while ( $efeed->have_posts() ) : $efeed->the_post(); ?>
<li>
<article class="article">
<div class="date"><?php echo tribe_get_start_date( $post->ID, false, 'F j, Y' ); ?></div>
<h3 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
</article>
</li>
<?php endwhile; else: ?>
<li><?php _e('Sorry, no posts matched your criteria.'); ?></li>
<?php endif; ?>
</ul>
<div class="dig-in"><a href="<?php bloginfo('url'); ?>/events/month/">See all Upcomming Events &raquo;</a></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment