-
-
Save anonymous/60f6ced5381783908ef9 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 | |
//$todaysDate = date('Y-m-d G:i:s'); | |
//tegory_name=Events&posts_per_page=3&meta_key=_EventStartDate&meta_compare=>=&meta_value='.$todaysDate.'&orderby=meta_value&order=ASC | |
$args = array( | |
'posts_per_page' => 3, | |
'meta_key' => '_thumbnail_id', | |
'order'=> 'DESC', | |
'orderby' => 'post_date', | |
'start_date' => date( 'Y-m-d H:i:s', strtotime( 'now' ) ), | |
); | |
$eventslist = tribe_get_events( $args ); | |
foreach ( $eventslist as $post ) : | |
setup_postdata( $post ); ?> | |
<?php // if ( has_post_thumbnail() ) { ?> | |
<li> | |
<a href="<?php the_permalink() ?>" title="Learn more about <?php the_title(); ?>"><?php the_post_thumbnail( 'post-featured' ) ?></a> | |
<h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3> | |
<div class="tribe-events-schedule updated published tribe-clearfix"> | |
<p class="event-meta"> | |
<?php | |
echo 'id=' . get_the_ID() . ' '; | |
echo tribe_events_event_schedule_details(get_the_ID(),'',''); ?> | |
<?php if ( tribe_get_cost() ) : ?> | |
<span class="tribe-events-divider">|</span> | |
<span class="tribe-events-cost"><?php echo tribe_get_cost( null, true ) ?></span> | |
<?php endif; ?> | |
</p> | |
</div> | |
<?php custom_excerpt(); ?> | |
<div class="center"> | |
<a class="button small" href="<?php the_permalink() ?>">Learn More</a> | |
</div><!--center--> | |
</li><!-- #post-## --> | |
<?php // } ?> | |
<?php | |
endforeach; | |
wp_reset_postdata(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment