Now that we have the system for adding a grid of post thumbnails to the front page in Genesis, the next thing we’re going to do is to display a grid of custom posts on the front page. And I’m going to do that for one of our member’s sites, Design on Media. He's got
Secondary WordPress Loops
The next thing we're going to do in this lesson on Using Secondary Loops to Customize the Genesis Theme with PHP is use the same system that we used to create a list of posts from a single category to create a grid of post images. I'm going to copy this function and paste it.
At this point in this lesson on Using Secondary Loops to Customize Genesis with PHP we have created a function to add a lists of posts from a single category and we’ve examined secondary loops in detail. So now that we've done that, let's make the function we created a little bit more useful. One
We've created a function to Add a List of Posts From a Single Category and we've hooked that function to a specific place in Genesis. That's what we do with all functions, whatever it is we're trying to do inside of a function, and we hook it into a specific location. So we've done that.
Now that we’ve talked about the different kinds of WordPress Loops and what they do, it’s time to look at the way all the loops work both primary and secondary. We’re going to begin talking about this by looking at the wordpress.org codex under Class Reference/WP Query. The way that works is with this WP_Query class.
We are going to talk about Genesis Custom Loops in this fourth lesson on Customizing the Genesis Theme. This topic is considerably more complicated or more advanced than what we covered in the Introduction to PHP for Genesis, Using Custom Sidebars in Genesis and Creating Custom Page Templates in Genesis. Before we begin talking about
This is the sixth lesson in our Customize Genesis Like a Pro video tutorial course but it's also the fourth lesson on how to customize the Genesis Theme using PHP. Here you'll learn how to use Secondary WordPress Loops. We begin with what a WordPress Loop is and how it works. We show several ways to create a them and what parts they are