It’s time to splice out the initialization code and load it into our new Genesis starter theme’s init.php file. The file loaders will go into the autoload.php file, while the constant declarations go into the init.php file. The typical way of doing the theme constants is to hard-code them such as this: Hum, but this information is already available in the theme’s style.css file. And as a matter of fact, WordPress reads that information right out of the CSS file. You can access that same information and then use it to populate your theme constants like this: In this episode, […]
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.
Slicing Up the Sample Theme’s functions.php
Let’s walk through the Genesis Sample Theme’s functions.php file and group like tasks, as you are preparing to move them into the appropriate files in your new starter theme.
Laying Out the Theme’s Architecture – Part 1
In this video episode, you’ll start building your new custom Genesis-powered starter theme. You’ll be adding the file and folder structures. Don’t worry, Tonya will walk you through each step and explain it.
The Why of Clean Code
There are two main principles which will accelerate your career in this profession: fundamentals and clean, quality coding techniques. Mastering these, incrementally building yourself up and incorporating them into your workflow and code will make you more in demand and marketable. Why? Why is clean, quality coding so important? Clean code means quality. You are increasing the quality of the product you are producing. Why? By breaking up your code into modules, having a function do just one thing and behavior, purposefully naming variables and functions, and making your code more readable, you are reducing the maintainability costs of code. […]
What the Heck is Modularity?
In software and programming, you hear the term packages and modules. It’s a principle and pattern of how we group code into like functionality, features, and components. In blogging, we group like content with categories to identify a central message. It’s similar in programming, where you take the web page and break it down, grouping like items together and then building the module for each of them. Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired […]
Lab Introduction
Let me introduce you to this lab, what you will be actively building, as well as the concepts that you’ll be learning.
Pagination Styles
Pagination is wrapped in with the content styles. However, pagination is navigation. Therefore, let’s pull it into the navigation module and walk through the same process we’ve done throughout this lab. Then we’ll walk through and ensure everything is finished and loaded into the index.php file. Lab’s Final Code Get the final code for this lab on GitHub by clicking on this button. This is the code you are building, as you and I walk through how and why, as well as refactoring and other alternatives to make it your own. The Sass navigation files are found in our GitHub […]
Accessible Navigation Styles
@include to bring in the Bourbon mixin for transform.
Primary and Secondary Navigation
Before you start this video, see if you can migrate over the media queries, assign color variables, and do the refactoring. Then work with Tonya to walk through the refactoring strategies. Remember you can setup the variable names and nesting the way you want for what fits your workflow.
Base Styles
Step one is to find and migrate in all of the media query styles and load those into the base styles partial. Remember the strategy is to have all of the styles for a component, module, or attribute to be within the file. We do discuss optimization strategies too with thinking about how to break down your styles. In this episode, you will start using Bourbon.io functions, such as rem to convert pixels to rems. First you look at the functions available to you in Sass. The pixel to rems conversion is not native to Sass. Therefore, you will use […]