WordPress — you push a button and it just goes, right? This course will take a deep look at the underlying magic that makes WordPress work and demystify those core components that make WordPress what it is.
This course goes in depth into the magic that makes WordPress work. We're going to talk about query strings, how they are used in WordPress, and how to manipulate them to control the behavior and output of WordPress. We're also going to talk about the Loop, what the Loop does and how it works, and how to create custom Loops specific to your needs or the needs of your project. This is an intermediate course and expects some level of familiarity with theme or plugin development or experience in PHP development.
Chris is a freelance WordPress theme and plugin developer, one half of the design studio Arcane Palette Creative Design, lead developer of WordPress theme shop Museum Themes and Project Manager for the event management plugin Event Espresso. In his free time, he makes electronic music.
Using the Loop Now that you know what we're talking about when we say The Loop and a little bit about WP_Query, I'll start to dig deeper into WP_Query and you'll build some custom loops using different WP_Queries. I'll go over the different possible WP_Query arguments and what they do. Then you'll learn about custom post types and custom taxonomies, how to register them, and then how to create custom loops using these custom content types to create unique types of loops with nonstandard WordPress content. We'll get started by talking about custom loops.
Mastering the Loop and Custom Queries You should be getting pretty familiar with the basic syntax of WP_Query and passing arguments to it to create custom loops. In this module we're going to manipulate the loop in some new ways, including altering the query after the WP_Query global has already been set up. We'll be looking at the pre_get_posts filter which allows us to pass values to alter existing values directly in the query global after it's been created and I'll talk about the difference between a couple of different functions that all perform similar actions, WP_Query, query_posts, get_posts and get_post. I'll show you how to run multiple queries in a single template and what you might use that for, how to create custom post meta and then create WP_Queries that filter by post meta values, what a tax query does and how to use it, how to use the date query function that was recently added into WordPress core, and then I'll show you a powerful plugin called Posts 2 Posts, which allows you to create relationships between different post types and query by those relationships. Let's get started by talking about pre_get_posts.
WordPress Search In this module I'm going to talk about WordPress Search. This is one of my favorite topics, particularly because it's so misunderstood and often forgotten about. If you understand half of what I've shown you already in this course, you will understand everything I'm about to tell you about WordPress Search. In this module I'm going to talk about what WordPress Search actually does, how WordPress Search works, what query strings are and how WordPress Search uses those query strings, and how to add custom parameters to your search to fine tune search results within a specific set of desired content types. Let's get started.