Join Morten Rand-Hendriksen for an in-depth discussion in this video Changing an existing template file, part of WordPress: Building Child Themes.
- View Offline
- In addition to using a child theme…to change the overall appearance…of a parent theme using CSS,…we can also use a child theme…to change the output of a parent theme…by changing the template files.…And this is where child themes become extremely powerful.…If you have a parent theme…there's a good chance that there are…components within that parent theme…you may want to change, or reorder, or take out,…or there might be something new that you want to add in.…And all this becomes possible in a child theme…without affecting the parent theme.…That means even if you change the output…of a specific template file…you can still update the parent theme…when a new version comes out…without your entire site breaking.…
So that's exactly what we're going to do…in this chapter and the next chapter.…And we're going to start with something really simple.…What if you want to make a basic change…to the HTML output of an existing template file.…For example, in the current single.php file…you can look at a single post that has one comment…
WordPress: Building Child Themes opens the world of child theme development to anyone, no matter what level of experience or expertise. It helps you build your child theme on top of an existing properly coded foundation, and create stylish new WordPress sites—without the advanced knowledge of a web developer. Morten Rand-Hendriksen explains how to get started picking a parent theme, updating the CSS, creating a new template for your child theme, and updating its functionality. By the end of this practical, project-based course, you should have a functioning child theme and the skills to quickly customize your next WordPress site.
- What is a child theme?
- Creating and activating a child theme
- Overriding or overwriting?
- Changing existing styles
- Adding new styles
- Creating templates for the child theme
- Adding new menus and widgets
- Replacing custom web fonts