-
-
Save litonarefin/27f6f8c454b8fcef6f2a1895eaf0f666 to your computer and use it in GitHub Desktop.
Events Calendar Pro event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 »</a></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment