Unlock your potential with a Pro Membership
Here is where you propel your career forward. Come join us today. Learn more.
Standard Loop Overview – Part 1
Lab: The Loop – Developer’s Guide to Customizing Genesis
Video Runtime: 08:30
The standard loop is responsible for looping through the content WordPress pulled out of the database for this web page. Genesis’ standard loop fires each of the events as it builds up the HTML markup that is rendered out onto the web page. This is where the entry
code is processed including the entry header, entry content, post info, post meta, and more.
In this episode, you will start walking through the standard loop in Genesis to see how and why it interacts with WordPress. You will dive into WordPress Core to discover what’s behind the function have_posts()
. You will even be introduced to Object Oriented Programming (OOP).
You are focusing your attention here in the these two episodes:
if ( have_posts() ) : | |
do_action( 'genesis_before_while' ); | |
while ( have_posts() ) : the_post(); | |
... | |
endwhile; | |
do_action( 'genesis_after_endwhile' ); | |
else : //* if no posts exist | |
do_action( 'genesis_loop_else' ); | |
endif; //* end loop |
Who needs copy/paste? Right. Writing code from scratch is fun!
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