For and (?)
What Is a Theme?
The technical answer is that the theme is the display layer of the website: what you see on the page when you visit your site is styled and presented by your theme’s files. Those files can be as little as two, or in some cases, hundreds of files.
The WordPress Codex states: “Fundamentally, the WordPress Theme system is a way to ‘skin’ your weblog. Yet, it is more than just a ‘skin.’ Skinning your site implies that only the design is changed. WordPress Themes can provide much more control over the look and presentation of the material on your website.” (Source: http://codex.wordpress.org/Using_Themes)
So a theme does control things like how blog posts will appear on the homepage, but it also offers control over various ways the blog will be viewed or function. For instance, over things like whether you want to show who wrote a blog post or not, how many comments are on each post, and whether you want the text be black under a blue header or some other color, to name a few. WordPress themes have many dynamic areas that get filled with information from your database (text and images), third parties (Twitter, Facebook), and your users’ interactions with the site (comments.)
Analogy for a WordPress theme
Those that know me have heard this ‘house analogy’ plenty of times when it comes to talking about websites, and I believe it is particularly good at describing how WordPress (and other content management systems) works.
Your WordPress website is made up four parts: the Core, the Theme, the Content, and the Database. For this analogy think of:
- the Core as the basic structure of a house (foundation, outer walls, plumbing, wiring, roof);
- the Theme as the finish work of the house (flooring, paint, faucets, electrical sockets, and even the interior walls that are not load bearing—meaning holding the roof up);
- the Content as your stuff (furniture, pictures, throw rugs, and shelves);
- the Database as the safe that holds a detailed map and inventory of the contents (where your stuff is located in the house, the attributes like color, and how much of it there is).
The more you know. The Theme lives inside the Core, and much of the Content lives inside the Database. Though technically uploaded images, documents and videos live in a folder outside the Database, the Database knows where to find them.
If you were to move the couch (Content) to the other side of the room, you would be updating the details (Database) of your house. Just as if you changed a word on a blog post your Database gets updated with the change. The structure part of WordPress does not change, just as moving a couch or adding a throw rug does not change the overall structure of your house.
In regards to switching or modifying themes, we could think of switching to a new theme as doing a heavy remodel to your house (covered in chapter 14), or modifying your existing theme as doing some painting or a light remodel of your home (covered in chapter 14.)
An Educated Choice
So, a theme is a skin that controls what your website’s visitors view and interact with on your site. It can also limit and expand the amount and type of content they can see. For example, a certain theme might show only three blog posts on the home page, whereas another shows 10, or none. Or, a theme could have the ability to show thumbnails of featured images with the blog post excerpt. Maybe on one theme a Twitter feed comes built in, and on other themes it does not. The point is that myriad solutions are possible. It is up to the developer to decide which features are necessary for a given theme.
One of the missions of this book is to discuss how you can be critical of these solutions and be able to make educated choices when you select a theme for your WordPress powered website. Selecting a WordPress theme is a lot like selecting a car: you have needs (seats four), wants (sunroof) and distractions (spinning rims). Spend too much time with the distractions and you might forget that your family of four won’t fit in that two-seater.
What Are Parent and Child Themes?
One way to modify a theme is to edit the files of the theme. Another way is to add to (or override) its functionality and styles with another theme. Modifying theme files is not optimal because you can no longer install updates for the theme. The second way, using a method called Child themes, is often better. This is preferred because you can modify your Parent theme and still get updates for the Parent theme while any modifications made by the Child theme remain in place.
Modifying themes. In chapter 13 we will discuss more about the principles of modifying a theme that explain why you don’t want to make modifications to the theme files if you plan on installing theme updates.
A Parent-Child theme setup is having two separate themes that work in tandem. The way it works is, say you install and activate a theme, and later on you find that it is missing some functionality such as an expanded footer, or you want to add another page template. You would be able do this by installing and activating a Child theme that specifically gives you a new footer or page template.
The Parent theme often does the bulk of the work, but the Child theme comes in and adds, removes or modifies specific parts of the Parent theme. Together their output works as one. If you remove the Child theme, the Parent theme remains intact and any changes made by the Child theme are gone.
Caution: Adding a Child theme to a Parent theme can move your widgets to the “Inactive Widgets” area of the Appearance > Widgets screen. Meaning, they will need to be added back by dragging them into the appropriate widget areas. The placement of widgets in the widgets areas is tied to the theme that is active. Once you apply the same widgets to Parent and Child, you can freely switch between the two since the database will remember the place and contents of widgets for each specific theme.
Where Do Themes Come From?
Themes mostly come from web developers since they require knowledge of PHP, HTML and CSS (at the very least.) Mostly? I say that because some web designers are also getting into the theme market. Some developers can also design the look and feel of a theme, while some designers can also write code. In some cases a designer and a developer will collaborate on a theme.
WordPress.org does not develop themes outside the small collection of “default” themes that have come with the WordPress versions over the years. And WordPress.org does not require themes to be submitted to them for their approval and release. Today, themes are developed by anyone that wants to create one, including freelancers, web designers, agencies, and students.
Anyone with access to the internet can write and share (or sell) a theme to anyone. Theme developers can choose to submit it to the WordPress Theme Directory (which at time of this writing has 2,351 themes available for download) or they can distribute it on their own.
Where does support come from? Keep in mind that just because the theme came from the WordPress Theme Directory does not mean WordPress.org supports it—themes are simply “subject to review” by WordPress Theme Review Team (see details of the review process). Support comes from the developer that uploaded the theme, not WordPress.org.
Due to the popularity of WordPress today, it has spurred a worldwide industry in theme development. Some companies do nothing but develop and sell themes, while others have added it to their list of services. Whereas companies like Envato’s ThemeForest simply provide a marketplace for themes and rely on developers to create, submit and support the themes in the marketplace.
CAUTION: Be aware that if you choose to install WordPress via your web hosting cPanel, then, depending on your web host, you may find that numerous themes come with the initial installation. I once witnessed a major web host load over 30 themes with my initial installation of WordPress.
Regina Smola of WPSecurityLock.com used DreamHost’s “One-Click Install” for a new WordPress installation and found it downloaded 134 themes, some with security vulnerabilities! (Source)
See chapter 15 where I cover uninstalling/deleting unwanted themes.
Why Are Themes Important?
Well, they’re not so “important” as they are mandatory—your WordPress website will not work unless you have at least one valid theme installed. At the time of this writing, WordPress 4.6.1 installs with three themes: “Twenty Fourteen” and “Twenty Fifteen” and “Twenty Sixteen.” The “Twenty Sixteen” theme is the default theme for 4.6, and I highly recommended that you leave it installed.
I’ll go into this more in depth later in this book, but know you should only have 2 to 3 themes installed at a time, with 2 being optimal. One theme will be the one you are using, and the other is a fallback. To go one further, I highly recommend you always use the default theme for the current version of WordPress as the backup.
The default themes are designed and developed by WordPress.org and the WordPress community of developers that volunteer their time to work on it, fix bugs and make it production-ready. Since WordPress is free, so are these themes, as well as the previous default themes “Twenty Thirteen”, “Twenty Twelve”, “Twenty Eleven”, “Twenty Ten”, “Classic” and the original “Kubrick” theme.
Default theme as backup. Keeping the default theme installed as a backup theme is a smart move for two reasons. One is that if your active theme is accidentally deleted from the server or WordPress declares it “broken,” it will automatically activate the default theme for that version of WordPress. It’s also good to have around so you can switch to it if your active theme starts to give you major problems.
The default theme for WordPress 4.4 is “Twenty Sixteen”, WordPress 4.0 through 4.3 is “Twenty Fifteen”, WordPress 3.8 and 3.9 is “Twenty Fourteen”, WordPress 3.6 through 3.7 is “Twenty Thirteen”, and 3.2 through 3.5 uses “Twenty Twelve”. WordPress will only activate them if they are already installed and their folder names have not been altered.
Leave a Reply