A Guide to Overriding Parent Theme Functions in Your Child Theme

If you've had any experience working with parent and child themes in WordPress, you'll know that the template files in your child theme override those in your parent theme. For example, if your parent theme has a page.php file and you create a new one in your child theme, WordPress will use the one in the child theme when displaying pages. You might think that functions would work in the same way:...

How to Include and Require Files and Templates in WordPress

When it comes to PHP, a lot of developers love the language, a lot of the developers hate the language, and a lot of developers generally just use it to get their work done. For what it's worth, I'm of the latter camp. I think PHP is fine. Like anything, it's not without its problems, but I enjoy working with it well enough and see it as a way to...

Generate WordPress theme templates with Underscores Components

You might already know about Underscores, often abbreviated as _s, which is a popular starter theme for WordPress. This is a big project maintained by Automattic which is the company operating WordPress. Recently they created another tool called Components. This is a free online theme generator built on WordPress with custom blueprints made for portfolios, business sites, and different blog themes from standard blogs to magazines. Components is completely free...

How to Override Parent Theme Functions in WordPress

If you are a budding WordPress theme developer there is one thing you will have to end up knowing sooner or later. That is, how to override parent theme functions in WordPress. The reason you would want to do this is to be able to alter some or most of the behavior of a parent theme while retaining other features that are inherited into your child theme. With this WordPress feature,...

Prefix all the things

When building WordPress themes, there’s a rule that sits at the top of the list of rules. It’s something all developers should do out of habit, not as an afterthought. Prefix everything. What does it mean to prefix something? Basically, when you create custom functions, classes, and other items in the global namespace, it needs to be unique so that it doesn’t conflict with WordPress, plugins, or other scripts. Therefore,...