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.

Using a custom Genesis loop

Using a custom Genesis loop

From the course: WordPress: Customizing Themes with Genesis

Start my 1-month free trial

Using a custom Genesis loop

- [Instructor] In this video, I'd like to show you how to use the Genesis custom loop. So, here I am, in loop stop PHP, in the Genesis framework. And on line 197, I've got this Genesis custom loop function. And we can see that it takes an array of arguments. So, what our objective is here, is to pass on some arguments that are different from the default word press query. And in order to do this, I first need to start by unhooking the regular loop, and then adding in this Genesis custom loop. So, I'm going to go to the functions dot PHP file for my Genesis sample theme. And we'll go to the very bottom, add some extra lines, so we can see it better. I'm going to do a remove action on the Genesis loop hook, and I want to remove the default Genesis loop, which is called Genesis do loop. And then I'm going to do an add action. I want to keep it on that Genesis loop hook, but we're going to pass a custom function that calls that…

Contents