WordPress Themes, Child Themes, And Frameworks Explained

Blog, Premiumcoding blog No Comments

For those who are new to WordPress, the theme marketplaces can seem both remarkably straightforward and somewhat confusing. Straightforward because it’s quite easy to purchase a theme, or download a free WordPress theme, and install it. Confusing because to make the most of WordPress themes, you need to understand some simple terms.

Let’s start at the beginning: what is a WordPress theme? A theme is a package of files that lay the foundation for your site’s appearance and, to a lesser degree, its functionality. I say “foundation” because most themes are flexible to some degree and you’ll be able to customize many —but not all — to bring them in line with your vision for your site.

Let’s take a closer look at the three main constituents of a WordPress theme: PHP files, CSS files, and JavaScript files.

PHP is the language in which WordPress is written. It’s a programming language optimized for web development. When a user requests a page from your WordPress site, the content management system executes a number of PHP files, which may query the site’s database for content. This is how WordPress pages are built, the executed PHP returns an HTML page, which the web browser renders as the page your visitors see.

But HTML is only part of a webpage: the content and the structure. The appearance of the page — how the various elements included in the HTML look — is determined by the theme’s CSS files. CSS stands for Cascading Style Sheets, and they control everything from the size of headings and body text to how page elements are laid out on the page relative to each other.

JavaScript is another programming language. It differs from PHP in that it is executed in the browser, rather than on the server. JavaScript is what allows for interactive components like comments.

Modifying a theme involves editing one or more of these files. Most simple edits to a WordPress theme will be done by changing CSS files, but it’s not quite as straightforward as simply opening the relevant file in your browser and editing it. Some themes are built with editing in mind, and some are not, although if you understand how a theme is put together, it is possible to edit any theme.

Theme Frameworks

Theme frameworks are specialized themes. They are not meant to be used as they are when you buy or download them, but to provide a canvas on which you can build a theme of your own. In reality, they’re simply very flexible themes. Some include almost no features by default, and some come with many bells-and-whistles that can include drag-and-drop page builders and the like. Examples of popular theme frameworks include Genesis, Gantry, and Underscores (also known as _S).

Theme frameworks are more flexible than typical themes, and they require a greater level of knowledge to use.

Hipster WordPress Blog Theme

Child Themes

Child themes are themes that are based on other themes. If that’s not clear, consider the cases where child themes are used.

  • A WordPress user purchases a theme from a theme marketplace, but they want to make modifications to it. If they install the theme and then directly modify its code, all their modifications will be lost when the theme is updated. So they create a child theme that inherits all the features of the original theme, but which they are free to modify without fear of their changes being overwritten.
  • As I previously said, theme frameworks are themes that are designed to form the foundation of new themes. The new themes that are created from theme frameworks are child themes. If you use a theme framework on your site, then you shouldn’t directly modify the framework, for the reasons just discussed. You should create a child theme. In fact, the creators of theme frameworks like Gantry and Genesis made them so it was easier for them to build themes that they can sell. The developers behind the Genesis Framework sell a number of child themes.

 

It’s important to understand that if you want to modify your theme at all, you should create a child theme. When a WordPress theme is updated, the files that constitute that theme are overwritten, which would mean that any changes you make are lost. No one wants to spend hours tweaking a theme to perfection, only to have all their work undone the next time they update. If you create a child theme, it will pull most of its content from the parent theme, but specific elements will be overridden.

So which is right for you? If you don’t have much experience running a website or knowledge of CSS, PHP, and the like, then your best option is to choose a basic theme from a theme marketplace or the WordPress theme directory, or a premade child theme for one of the theme frameworks. If you want more flexibility and have at least a basic understanding of what goes into creating a theme, then a theme framework is for you.

Whichever you choose, creating a child theme is not difficult, and I would encourage anyone using WordPress to make a child theme so that modifications they make aren’t overwritten when the theme is updated.

 

About Graeme Caldwell — Graeme works as an inbound marketer for Nexcess, a leading provider of Magento and WordPress hosting. Follow Nexcess on Twitter at @nexcess, Like them on Facebook and check out their tech/hosting blog.

We really appreciate you for visiting PremiumCoding and reading this article! Now you might also want to check out our Themes here.
PremiumCoding
Written by PremiumCoding
We develop beautiful Wordpress themes with minimal and clean design.