Skip to content

Instantly share code, notes, and snippets.

Created March 31, 2015 22:48
Show Gist options
  • Save anonymous/651b96a1a2ef389a141a to your computer and use it in GitHub Desktop.
Save anonymous/651b96a1a2ef389a141a to your computer and use it in GitHub Desktop.
// Get all events from 1 week before the present date to 1 week in the future
$events = tribe_get_events( array(
'start_date' => date( 'Y-m-d H:i:s', strtotime( '-1 week' ) ),
'end_date' => date( 'Y-m-d H:i:s', strtotime( '+1 week' ) ),
'eventDisplay' => 'custom',
'posts_per_page' => -1
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment