[wp-hackers] location of search query

Mike Schinkel mikeschinkel at newclarity.net
Wed Jan 19 10:47:22 UTC 2011


On Jan 19, 2011, at 5:42 AM, Jimmy Roy wrote:
> I have a problem with the search function and I would like to echo the sql
> query, this query is in what file?

Just add this to the top of your search.php theme template file somewhere:

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

Hope this helps.

-Mike



More information about the wp-hackers mailing list