Created
October 20, 2010 17:02
-
-
Save scribu/636827 to your computer and use it in GitHub Desktop.
WP_Query Debug
This file contains hidden or 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
<?php | |
function wp_query_debug() { | |
global $wp, $wp_query; | |
echo '<pre>'; | |
var_dump($wp->matched_rule); | |
print_r($wp_query); | |
echo '</pre>'; | |
} | |
add_action('wp_head', 'wp_query_debug'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Paste the above code in a php file inside
wp-content/mu-plugins
and then visit the front page of your site.