WP_Query




DEFINITION: WP_Query

WP_Query is a class defined in WordPress. It allows developers to write custom queries and display posts using different parameters. It is possible for developers to directly query WordPress database. However, WP_Query is one of the recommended ways to query posts from WordPress database.

WP_Query is a powerful tool there are many parameters that can be used to write more complex and advance queries. WP_Query can be used to create nested loops (a WordPress loop inside a loop). WordPress developers can use it in their plugins and themes to create their own custom displays of posts.

A full list of WP_Query parameters is available on WordPress Codex.




« Back to Glossary Index

Pin It on Pinterest

Share This