Created
October 20, 2014 18:43
-
-
Save bmoredrew/4f7a992fd850c66169b3 to your computer and use it in GitHub Desktop.
tribe events show 7 days of events from cur date
This file contains hidden or 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 | |
/** | |
* Template Name: Week Test | |
*/ | |
?> | |
<?php | |
global $post; | |
$current_date = date('j M Y'); | |
$end_date = date('j M Y', strtotime('7 days')); | |
$all_events = tribe_get_events(array( | |
//'eventDisplay' => 'all', | |
'start_date' => $current_date, | |
'end_date' => $end_date, | |
'posts_per_page' => -1 | |
)); | |
foreach($all_events as $post) { | |
setup_postdata($post); | |
?> | |
<li> | |
<span class="date"><?php echo tribe_events_event_schedule_details() ?><?php //echo tribe_get_start_date($post->ID, false, 'j'); ?></span> | |
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> | |
</li> | |
<?php } //endforeach ?> | |
<?php wp_reset_query(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment