Created
February 4, 2020 21:07
-
-
Save bordoni/6c332b460893f385b689213ad352b8ad to your computer and use it in GitHub Desktop.
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 | |
$args = [ | |
'ends_after' => 'now', | |
'event_category_not_in' => [ 'seasonal-services', 'facility-schedule' ], | |
'posts_per_page' => 2, | |
]; | |
$orm = tribe_events()->by_args( $args ); | |
$events = $orm->all(); | |
?> | |
<ul class="feed"> | |
<?php if ( $events ) :?> | |
<?php foreach( $events as $event ): ?> | |
<li> | |
<article class="article"> | |
<div class="date"> | |
<?php echo tribe_get_start_date( $event->ID, false, 'F j, Y' ); ?> | |
</div> | |
<h3 class="title"> | |
<a | |
href="<?php echo esc_url( get_the_permalink( $event->ID ) ); ?>" | |
rel="bookmark" | |
title="Permanent Link to <?php the_title_attribute( [ 'post' => $event->ID ] ); ?>" | |
> | |
<?php echo get_the_title( $event->ID ); ?> | |
</a> | |
</h3> | |
</article> | |
</li> | |
<?php endforeach; ?> | |
<?php else: ?> | |
<li><?php esc_html_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