Unlock your potential with a Pro Membership
Here is where you propel your career forward. Come join us today. Learn more.
Genesis Do Custom Loop – Part 1
Lab: The Loop – Developer’s Guide to Customizing Genesis
Video Runtime: 12:37
In the Genesis function genesis_do_loop
, the code makes the choice of whether to do a custom loop or the standard one. If this page to be built has the template selected to “Blog”, which is the page_blog.php
, then the custom loop is used. Why? Because it allows your client (and you) to utilize the Theme Settings for the Blog Page Template settings. For example, you may have it configured as follows:
Why? It allows you to customize what you want displayed on the Posts Page, that page which displays all of the posts, sometimes labeled as the Blog. When you want to use these theme settings, Genesis needs to build a new query. It does so by passing a custom query arguments array and then instantiating a new WP_Query
object. Then The Loop uses this new custom query to build and render out the content to the browser.
Let’s take a closer look at the code which handles all of this functionality.
Hey... hey you... yes you!... Having a good time? Learning new things? Good!
Episodes
Total Lab Runtime: 02:26:17
- 1 Lab Introductionfree 06:09
- 2 What the heck is The Loop?free 14:29
- 3 Calling the Loop Overviewpro 06:51
- 4 Genesis Do Custom Loop - Part 1pro 12:37
- 5 Genesis Do Custom Loop - Part 2pro 09:51
- 6 Standard Loop Overview - Part 1pro 08:30
- 7 Standard Loop Overview - Part 2pro 10:34
- 8 Standard Loop and WordPress Corepro 11:29
- 9 Before the Loop Hook - genesis_before_whilepro 11:38
- 10 Before the Entry Hook - genesis_before_entrypro 06:10
- 11 Entry Header Hook - genesis_entry_headerpro 17:38
- 12 Entry Header - Post Title - Part 1pro 13:07
- 13 Entry Header - Post Title - Part 2pro 07:48
- 14 Entry Header - Post Infopro 09:26