WordPress – Get all of current page’s queries information

Okay… so here is what I’m trying to do. Basically all of the components that make up any particular page on a WordPress site, I need to be able to grab the query that WP is running to grab the data for that particular area of the given page. So, if we have page A, let’s say it has a top navigation, main content section, and footer. Each of these three areas have content that is pulled from the database. I need a generic way to say on page X I want to know what queries have been ran to generate all of the content pulled from the database and displayed on the page.

I feel like the key is to properly use https://codex.wordpress.org/Class_Reference/WP_Query to get the data I need.

Read More

Any thoughts on how I could go about this?

Related posts