I am trying to debug the Search Everything plugin, which has worked before for me on sites but not working(returns zero results) on a current site. If I could see what sql was being performed, I could get a better idea of whats wrong. This is for a normal search box type search of posts and pages, etc.
Share
The SQL is generated in the
get_posts()function in wp-includes/query.php. If that link doesn’t take you to the right spot, search the function forif ( !empty($q['s']) ).Looks like the
posts_searchfilter is called immediately after that block, so you could hook into that to dump the generated SQL to a file (if echoing doesn’t work).