By the time index.php runs, it seems as though there is already a query populated.

How can I find out what that query’s query string is?

eg. new WP_Query([query string is here])

2 Answers
2

Take a look at global $query_string;.

Or var_dump( $GLOBALS['wp_query'] );.

Leave a Reply

Your email address will not be published. Required fields are marked *