Per stampare la query SQL che WP fa, si usa:
con query_posts()
<?php echo $GLOBALS['wp_query']->request; ?>
con WP_query
$my_query = new WP_Query();
echo $my_Query->request;
Per stampare la query SQL che WP fa, si usa:
con query_posts()
<?php echo $GLOBALS['wp_query']->request; ?>
con WP_query
$my_query = new WP_Query();
echo $my_Query->request;