Created
May 23, 2017 02:58
-
-
Save trishasalas/4b1e2c5084b56c994843672d3a938ce1 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
<div class="small-12 medium-6 large-4 columns"> | |
<?php | |
$events = tribe_get_events( | |
array( | |
'posts_per_page' => 1, | |
'orderby' => 'meta_value', | |
'order' => 'DESC', | |
) ); | |
foreach ( $events as $event ) { | |
$terms = get_the_terms( $event->ID, 'tribe_events_cat' ); | |
?> | |
<p class="home-cat"> | |
<?php | |
foreach ( $terms as $term ) { | |
echo $term->name; | |
} | |
?> | |
</p> | |
<a href="<?php echo tribe_get_event_link( $event->ID ) ?>"> | |
<?php echo tribe_event_featured_image( $event->ID, 'home-blog', true ); ?> | |
</a> | |
<div class="home-news-content clearfix"> | |
<a href="<?php echo tribe_get_event_link( $event->ID ) ?>"> | |
<h2><?php echo $event->post_title; ?></h2></a> | |
<p><?php echo $event->post_excerpt; ?></p> | |
<a class="home-read-more" href="<?php echo tribe_get_event_link( $event->ID ) ?>"> | |
Read More | |
</a> | |
</div> | |
<?php wp_reset_postdata(); | |
} ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment