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.
Code. Eat. Code. Sleep. Dream about Code. Code.
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