-
-
Save jesseeproductions/408547173032ed490c9b to your computer and use it in GitHub Desktop.
The Events Calender Show Post and Query Information in Console
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( '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