How does Genesis call The Loop? What HTML markup does it render out to the browser? In this episode, you will look at the lib/framework.php file, where the event genesis_loop is fired. You’ll compare that to the actual HTML markup to correlate the code to what the browser receives. Then you’ll take your first look at the looping functionality found in the file lib/structure/loops.php.
Labs
Labs are hands-on coding projects that you build along with Tonya as she explains the code, concepts, and thought processes behind it. You can use the labs to further your code knowledge or to use right in your projects. Each lab ties into the Docx to ensure you have the information you need.
Each lab is designed to further your understanding and mastery of code. You learn more about how to think about its construction, quality, maintainability, programmatic and logical thought, and problem-solving. While you may be building a specific thing, Tonya presents the why of it to make it adaptable far beyond that specific implementation, thereby giving you the means to make it your own, in any context.
What the heck is The Loop?
You hear about the WordPress Loop all the time. But what is it, without getting too deep down into the rabbit hole? Let’s talk about how WordPress assembles the information to prepare it for The Loop and then how the theme executes The Loop. Don’t worry as this is an overview of the process and handling without going too technically deep into all of the how tos. But you will learn about the why of it as well as answering the question: What the heck is The Loop? By the end of this one, you should have a good handle […]
Lab Introduction
Let me introduce you to what you will be doing in this lab. You will be working in the Genesis framework, a child theme, and WordPress Core to dissect the Loop. More specifically you will be learning about the Genesis standard loop and how to customize each of its components.
The Loop – Developer’s Guide to Customizing Genesis
The Loop is a vital component in WordPress, as it handles building and rendering out the content onto the page. The Genesis framework handles the loop for you, as well as providing you with the hooks you need to customize each theme for your client. In this lab, you will be diving into the loop structure, looking at the entry header, title areas, entry content, post info, post meta, and more.
Let’s Look in Core at get_post
– Part 2
This episode continues reverse engineering get_post in WordPress Core. Now that you understand the database, or at least have a basic understanding of it and SQL, you will continue looking at get_post. You’ll see how each column in the database populates a property in the object that you get back when calling this function.
Let’s Look in Core at get_post
– Part 1
Let’s go deeper and head into Core to look at get_post. This function is going to either pull the post content from the database or cache. In this episode, you will learn about both and reverse engineer the function to discover when it’s pulling from one or the other. As the function is dealing with the database, it’s time to teach you some SQL. You will play around with the database to see how to pull records. I use Sequel Pro, but you can use phpMyAdmin to do the same exploring of the database. Here are additional resources about PHP […]
Genesis Before Loop Event genesis_before_loop
From the previous episodes, you identified genesis_before_loop as the event you need to register your callback in the plugin in order to render out the content into the right spot on the page. Let’s talk about this event. In this episode, you’ll walk through the basic structure of Genesis, looking at the function genesis(). You will also look at the Loop in Genesis in order to gain a general understanding of where this event places your content into the HTML structure.