FREELessons: 10Length: 1 hour

Next lesson playing in 5 seconds


Create Custom Queries in WordPress With WP_Query



On every page that your site displays, WordPress runs a query to determine whether to retrieve a static page or generate an archive list. Usually the default query is enough, but sometimes you want to go a little further. That's where WP_Query comes in. WP_Query is a powerful tool you can use to customise the way your WordPress site queries the database.

In this course, you'll learn how to harness the power of the WP_Query class to write your own custom queries. You'll learn how to get a theme and plugin working together with a custom query, how to change the query parameters, and how WP_Query works together with the Loop. Along the way, you'll get to code a number of practical examples that show how useful WP_Query can be.

Do you want to learn WordPress development from start to finish? Check out our learning guide: Learn WordPress Development.