Skip to content
WordPress Basics

What is a WordPress theme and a child theme?

A WordPress theme is a set of files that determines the visual appearance and functionality of your WordPress website.

Čo je to WordPress téma a child téma?

A WordPress theme is a set of files that determines the visual appearance and functionality of your WordPress website. By using different WordPress themes, you can easily change the overall design and layout of your site without having to change its content or structure.

On the official WordPress website, wordpress.org, you will find a huge collection of free WordPress themes. You can search for a theme by various criteria such as design, features, popularity or user ratings. These free themes are a great choice for beginners on a limited budget.

Free WordPress themes
Free WordPress themes in the official directory on wordpress.org.

Besides free WordPress themes, there are also premium themes. You can find them on dedicated websites such as Elegantthemes.com, Wpastra.com or Athemes.com, as well as on well-known marketplaces like Envato Market, where you can choose from many WordPress themes for different purposes. Compared to free themes, premium themes offer higher-quality design, customer support, extended features and ongoing development. They suit anyone who needs to build a website with advanced customisation options.

Premium WordPress themes
Preview image of the Divi theme by Elegantthemes.

Here at wpdeals.top you will find deals and coupon codes not only for WordPress themes, but also for plugins, courses, hosting and domains – all in one place.

Pros and cons of free and premium themes

Free WordPress themes

Pros +Cons -
Free and available to all usersMay have limited support and updates
Large selection for different purposesMay be vulnerable to security threats
Sufficient for simple websites and for getting to know WordPressCustomisation options may be limited

Premium WordPress themes

Pros +Cons -
Professional design and extended featuresMore expensive, especially if you need a licence for several websites
Wider options for customising features and design
Regular updates
More secure
Better support from vendors

What is a child theme and how do you create one?

Besides standard WordPress themes, there are also so-called child themes. A child theme is a derived theme based on a parent theme. With a child theme you can change the look and functionality of the parent theme, and your code is preserved even when the parent WordPress theme is updated.

Why use a child theme

As mentioned above, a child theme lets you safely update the parent theme, because all your customisations of functionality and design made through the child theme stay untouched. If you edited the parent theme’s files directly and it got updated, all your changes would be lost.

TIP: If you want to add a Google Analytics tracking code to your website, add it to the functions.php file in your child theme.

How to create a child theme

Creating a child theme is easy. Follow these steps:

  1. Using FTP, create a new directory for the child theme in the themes folder (/wp-content/themes/). You can name it parent-theme-name-child. So if your parent theme is Divi, name the child theme divi-child.
  2. Create a new file called style.css, where you will change the styles of individual elements on your website. This file also holds basic information about the child theme (name, author, website, description, ...)
/*
Theme Name: Divi child
Theme Url: https://old.wp-zlavy.sk
Description: Táto child téma je odovdená téma on elegantnej Divi témy.
Theme Author: Peter Dudák
Author Url: https://old.wp-zlavy.sk
Template: Divi
Verzion: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html 
*/
  1. Create another file called functions.php and paste the following code into it, which tells WordPress which styles and scripts the child theme should take over from the parent theme. You can add code to this file to customise your website’s functionality.
<?php
add_action('wp_enqueue_scripts', 'enqueue_parent_styles');
function enqueue_parent_styles() {
   wp_enqueue_style('parent-style', get_template_directory_uri().'/style.css');
}
?>
  1. Add an image named screenshot.png with dimensions of 1200px X 900px.
  2. Finally, in the WordPress dashboard go to Appearance -> Themes and activate the child theme you created.

Once the child theme is created and activated, you can start changing the styles (style.css) and functionality (functions.php) as you need. All changes you make in the child theme take precedence over the parent theme, and everything else is taken from the parent theme.

If creating a child theme manually seems too complicated, you can use the Child Theme Configurator plugin. Some parent themes also have their own child theme generators that create the child theme for you. For example, you can find a child theme generator for the multipurpose WordPress theme Divi by Elegantthemes at divi-pixels.com.

Author

Peter Dudák

I'm the creator and operator of wp-zlavy.sk, where you'll find the most WordPress deals in one place. I enjoy scouting, programming, WordPress and everything around it.