Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tpennock-gist/3151643 to your computer and use it in GitHub Desktop.
Save tpennock-gist/3151643 to your computer and use it in GitHub Desktop.
Wordpress - Display wp_query SQL query details
<? echo $GLOBALS['wp_query']->request; ?>
@cowgill
Copy link

cowgill commented Jun 30, 2017

Old and useful gist but you shouldn't use the <? shortcut tag because it's not always enabled on all servers.

<?php echo $GLOBALS['wp_query']->request; ?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment