Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Created October 24, 2014 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseeproductions/6c55c0f88346dc75afbb to your computer and use it in GitHub Desktop.
Save jesseeproductions/6c55c0f88346dc75afbb to your computer and use it in GitHub Desktop.
The Events Calender Get Query Variable and Place in Console on List View
add_action( 'tribe_events_pre_get_posts', 'events_console_order' );
function events_console_order( $query) {
if ( tribe_is_past() || tribe_is_upcoming() ) {
$events_query = json_encode($query);
echo '<script>
console.log('.$events_query.');
</script>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment