Looking the most recent WordPress query that is run on a given page can be useful for several reasons:

  • you see how the information in the database is retrieved,
  • you learn how the underlying query system works,
  • you’re able to benchmark your custom queries,
  • and more.

In a recent article for Envato, I share a 60-second video on how you can quickly take a look at the last query executed on a given page.


The Most Recent WordPress Query

From the article:

In the following video, you will see how to write a custom function that hooks into the WordPress lifecycle to display the WordPress query that was run most recently.

The Most Recent WordPress Query

If you’re interested in what the article has to say and what the video has to show, then check out it out on the article page.

Done in 60 Seconds?

As mentioned in another post that covers a different topic in 60 seconds, this series of posts is a new category on Envato.

This particular series of short videos are for those who are looking to get up and running quickly with an idea and for those who have a bit more experience with certain topics.

Although the video the video shares the basics of reviewing the most recent WordPress query, there is always more to learn on this topic (as with any other topic).

With that said, enjoy the video and perhaps it will help expose you to how the underlying query system works.