Choosing the right WordPress theme can be a tall order. It’s more than just the aesthetics of your site that are in play with your choice. Your site’s performance, responsiveness, SEO, user experience, even security are all impacted by the choice you make. With all that at stake, it becomes a pretty important decision in the success of your website.
Whether you’re building out your very first WordPress website or just feel like it’s time for a change, understanding how themes work and what to look for in a theme is a fundamental part of being a website administrator. This will be a two-part series that explores first what makes a theme tick and then pivots to helping you choose a WordPress theme from the myriad options out there. Join us as we explore WordPress themes!
Inside a WordPress Theme
We’re not going to take a deep dive into the mechanics and specific files of a theme here. It is very useful to have a basic understanding of what a theme looks like under the hood and how it functions, however. We’ll keep it simple and at the end of it you’ll have a much better understanding of what it is you’re shopping for. Here we go!
Your theme lives in your wp-content folder within WordPress. Open that up and you’ll see a whole lot of .php files, like so:
These are your theme’s template files. With WordPress, all of your website’s unique content is stored in your database. When a page loads, the required content is grabbed from the database using PHP and displayed for the user using your theme’s template files.
Once upon a time (read: the 1990’s), if you wanted to change the look of your homepage you could just go to your homepage’s .html file and go to town. It’s not quite that simple anymore. Each template file has a role to play in the overall look of your website, but it’s not usually a simple 1:1 correlation of template file to page. Each page likely pulls from multiple template files.
In fact, it’s highly unlikely that any two randomly selected themes will have the same template files at all (outside the core WordPress files). In a simple sense, you could think of them as a cobblestone pathway. No two masons are going to use the exact same size and shape stones in exactly the same pattern to build two different walkways. They’re going to mix and match in a way that fits their vision. So too will different theme developers use a diverse mixture of template files to build their theme.
Template Files & The WordPress Template Hierarchy
Core WordPress template files follow a standard naming convention. That naming convention is an ordered hierarchy that indicates to WordPress which template files should be checked first when loading a page. It searches first for files most specific to the page. If none are found, it gets gradually less specific in its search until it eventually defaults to loading the display instructions found in the index.php template file if one is present.
You can see the WordPress Template Hierarchy in this image from WordPress.org (click to enlarge):
As an example, let’s say WordPress is asked to load https://wpsite.com/author/james. Following the author path at the top of that image, it’s going to look first for author-james.php. If none is found, it will look for the slightly less specific author.php. If that’s not there, then it looks for archive.php. In the absence of archive.php, it defaults lastly to using the index.php file which every WordPress install should contain.
That, in an extremely simple nutshell, is your introduction to template files and the WordPress template hierarchy. There’s a lot we haven’t touched on that is required for a theme to function, like functions.php and style.css for example. You can see those in the twentysixteen folder in our first screenshot. We’re not going to go into theme development with this, however. If you’re now at least a little more comfortable with what your theme is and what you’re looking at when you peek inside your WordPress install though, then mission accomplished so far.
Now let’s move on to familiarizing ourselves with three different terms or ‘types’ of themes you’re going to read about or encounter in the wild, and the difference between them.
Theme Frameworks, Parent Themes, and Child Themes
You’re bound to see these terms while you’re out theme shopping. Let’s get into each of them here so you know what they are.
Consider a house as it’s being built. You need foundation and frame first. After that wires and plumbing are run and drywall is hung. Finally you’re doing trim work and painting. Each of our terms here fit that example pretty cleanly. A theme framework is the foundation and frame for a fully fleshed out theme- a parent theme. It’s a frame that a theme developer builds out that is not a finished theme in and of itself, but which will allow for full fledged themes- parent themes- to be built on top of it.
This is what the majority of us just call “a theme”. When you’re shopping themes on ThemeForest for example, you’re browsing parent themes. A theme developer has chosen a framework, run their own wires and plumbing, hung their own drywall, and slapped a nice coat of paint on it. A parent theme then is what you install as a theme to your WordPress website.
You’ve got your WordPress theme installed, but man… that background color needs to change. How to do it? If you modify your parent theme directly, then next time you hit ‘update’ on it, *poof*, those changes are gone. You need a child theme. We have a detailed walkthrough of how to build one right here on wpninjas.com. It’s really easy. So, a child theme is not a full theme by itself, but unique modifications to a parent theme that you’ve made for your own website.
Examples of All Three
Our good friend Andy Wilkerson is the WordPress theme developer behind Parallelus, a popular name in ThemeForest. He developed the Runway theme framework to build Parallelus themes on top of. Ninjaforms.com‘s theme is built on top of the Runway framework, using a Parallelus-made parent theme, modified using a child theme to be uniquely our own. Our own website is a great example of all three!
Another example is StudioPress, a retailer of premium WordPress themes. They build out gorgeous parent themes like The Modern Studio (note they use Ninja Forms as their demo contact form!) on top of the Genesis framework. If you were to select The Modern Studio as your theme, you could then make modifications in a child theme to make it uniquely yours.
Hopefully this has helped you wrap your head around WordPress theme basics. Being an informed consumer is fundamental to making good quality choices when you purchase, and our aim here is to have taken the first steps in that direction. We’ll dive into Part 2 next week and look at specific things you should consider and weigh when theme shopping, and how your choice of themes (and theme framework) can impact more than just the look of your site.
Are you in love with a particular theme or theme framework? Have anything to add? Let me know below!