From the course: WordPress: Customizing Themes with Genesis

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Digging deeper into the WordPress loop

Digging deeper into the WordPress loop

From the course: WordPress: Customizing Themes with Genesis

Start my 1-month free trial

Digging deeper into the WordPress loop

- [Instructor] At this point, we know what the default WordPress loop does. We also know that the posted outputs is relative to the template file it's being called from. But what about when you want to use the loop to output something other than the results of the default query? I want to highlight some different ways that you can customize the loop and when or why that customization might make sense. There are two basic ways to think about interacting with the query. One is that you've already got your default query that WordPress is using and you want to jump in there and make some changes to it. Or two, you want a whole new query altogether that's grabbing some different content. So that first scenario, when you might want to take the existing query and just customize it a bit, that could look like ordering your posts alphabetically instead of by date, or maybe you only want to show posts by one author, or from one…

Contents