Let’s take the code we developed in the Twenty Seventeen theme and move it over to a Genesis child theme. I’m using the free Genesis Sample child theme.
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.
Version Numbering Scheme
Before we go any further, let’s talk about version numbering scheme. There is no best practice or set standard that all must adhere to. Rather, each group, company, or team needs to define and standardize their version numbering system. WordPress uses a three sequence numbering scheme: 4.8.1, where the third sequence is a minor release. I recommend that you read this document, especially if you are going to work in Core. Other libraries, frameworks, and applications define and use their own numbering scheme. Take a look at Wikipedia’ Software versioning article. Quickly you’l notice that there are multiple strategies that […]
What is a URL Query String?
In this episode, let’s talk about what a query string is. Makes sense, right? You first need to understand the URL and those additional parts of information. Then we can move forward.
Forget Hard Coding Version Number
In this episode, you’ll build an automatic way to set the theme’s version number. These strategies eliminate the need to hard code the theme’s version number. Let’s start with the Twenty Seventeen theme. I want to show you that these techniques work on any theme. Then in the next episode, we’ll move it over to a Genesis-powered child theme. For strategy 1, when you are in development/debug mode, we want to use the file’s modification time instead of having to change the asset’s released version number.
Lab Introduction
Assets are the stylesheets, scripts, images, fonts, etc. that are on the website’s hard drive (i.e. web host’s hard drive) that are downloaded to the browser. Versioning gives us the ability to change each asset’s static URL to ensure our changes go out to the browser (bust through cache). In this hands-on coding lab, you will be learning better techniques and strategies for automating your asset versioning in WordPress. No more hard coding the version number when you enqueue. This is a lab that everyone needs regardless of skill level. Whether you are an implementer or advanced developer, this one […]
Automate Asset Versioning – Better Asset Versioning
In Part 1 of the Better Asset Versioning, we are looking at the version number that is applied to each asset resource, i.e. our scripts, fonts, and stylesheets. We are highly inefficient with this process. Let’s eliminate the hard coding of version numbers when we enqueue. Let’s build a better strategy for version numbers when in development mode. Let’s automate versioning and improve our build process.
Build a Custom Genesis Child Theme – Genesis Theme Development A-Z
Want to build custom Genesis themes professionally? Then this is the series for you. You and Tonya will dive deep into the entire process of building a real world, fully-functional, custom Genesis child theme from scratch. You’ll learn deeply about the framework, WordPress, PHP, HTML, CSS, and more as you build this theme.
Render Entry Footer Terms
In this episode, you and I are going to explore the Genesis framework. You’ll learn about the [post_terms] shortcode available to you in Genesis and how to customize its user-defined attributes to add the taxonomy and text before the labels. You’ll learn about the “genesis_post_meta” filter event too, as you will register a callback and then take a deep dive into its processing.
Which One to Use?
Which strategy should you use? It depends upon your specific project needs. In each episode, you and I talked about when it’s appropriate to use each strategy. 99.999 times out of 100, you’re going to use strategy 3. Why? It has the following advantages that we’ll talk about in this episode: It’s one line of code It targets the specific page It does not run on every single web page
Strategy 4: Reusable Function
The fourth strategy is to encapsulate the functionality and abstract it away to a reusable function within your child theme. Let’s do this together. While you could add this function to your child theme’s functions.php file, it’s better to build your theme’s in a modular format. Best Practice – Modular Approach Using a modular approach, you will create a folder in the theme’s lib folder and call it structure. Then in the {child theme}/lib/structure folder, create a new file called footer.php. Here is the code that removes the site footer for each of the pages that you specify: You’ll need […]