Using a method similar to the one described here, I can see the total number of queries being made in Wordpress when I load a page.
Now I\'d like to display all da
or you can hook into posts_request. You can put the coe inside functions.php such as
add_filter('posts_request','debug_post_request'); // debugging sql query of a post
function debug_post_request($sql_text) {
$GLOBALS['debugku'] = $sql_text; //intercept and store the sql
return $sql_text;
}
in your theme footer, you can use print_r like
print_r($GLOBALS['debugku']);