-
-
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
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
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