Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Created October 24, 2014 17:58
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/408547173032ed490c9b to your computer and use it in GitHub Desktop.
Save jesseeproductions/408547173032ed490c9b to your computer and use it in GitHub Desktop.
The Events Calender Show Post and Query Information in Console
add_action( 'pre_get_posts', 'events_console_order' );
function events_console_order( $query) {
global $post;
$events_query = json_encode($query);
$events_post = json_encode($post);
echo '<script>
console.log('.$events_query.');
console.log('.$events_post.');
</script>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment