This episode continues exploring the custom loop. You’ll be learning about the PHP constructs: str_replace explode You’ll also see what paged does and walk through the rest of the custom loop code. This episode shows you how the PHP code works as well as why it’s written the way it is. You’ll even take a look at what data is present in the global variable $wp_query and how it changes after we generate the custom loop.
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.
Genesis Do Custom Loop – Part 1
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 […]
Calling the Loop Overview
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.
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.
Building the Header Right Sidebar
There are a couple of filters and callbacks for adjusting the menus when added to the header right area. Let’s reverse engineer the code to see what these do and why they are needed.
Adding and Removing Structural Wraps in Genesis
In the Genesis framework, structural wraps give you further styling control and containment of your content, as it wraps your content in a <div class=”wrap”>. You are able to specify where you want these structural wraps by configuring it within your child theme. In this lab, you will be adding and removing structural wraps by configuring the context using add_theme_support().
Customizing the Read More Link in Genesis
The Genesis framework defaults to a standard read more link which looks like [Read more…]. But what if you want to read Continue reading, Learn more, or whatever? What if you want it to be on a separate line in its own paragraph? What if you want it to look like a button instead of just a standard link? Well, then this lab is for you. In this lab, you will customize your Genesis child theme, any child theme, to fit your project’s needs. Yes, you will be doing all of these customization features.
Handling the Read More When There is No Content Limit
When you have your child theme setup to use content but there is no content limit set, your client may use the