Child Themes or Derived Themes. Make full use of them.

You ask what child theme is, in Slovak “derived theme” is and why you should use it? How will your WordPress page change and how will these changes take effect after it is updated?
In the next post, you will learn more about how a derived topic works, how you should use it, and what you should not forget if you want to work with it.

What is a derived topic?

A derived theme is a kind of addition to your existing WordPress theme. According to the WordPress Code , it is a theme that inherits the functionality and style of the theme, which is called the parent theme ). Such themes are the recommended way to edit existing themes.
According to statistics, up to 85% of WordPress users edit their topics. But only 35% of them use derived topics. Using them to customize your code can save you time and trouble.

Derived themes have the ability to customize the theme to your liking without any modification to the base files. Because creating a derived theme also creates a separate set of files. For designers, this means that these themes give them the opportunity to create a new design while maintaining the functionality of an existing theme.

Everything is perfect, except for one thing. This issue may occur if you want to activate multiple derived topics at once. This will not be possible. In practice, this means that if you use a Storefront theme, for example, you have also created a derived theme, it will not be possible to create a “grandchild” theme for further customization. However, every problem has a solution, just like this one. There are some smart ways to modify a derived theme without worrying about losing changes you’ve made before.

How do you create your own derived theme?

1.Create a theme directory in your WordPress installation

2. Create a stylesheet with information on the derived topic

3. Pull it into the “style” folder of your existing theme ( Pull in the styles of your parent theme)

If you manage these steps, all you have to do is activate the topic. Your site should look the same as before. The change is that you will now be using a derived theme. Let’s take a closer look at these steps and show you the procedure on the Twenty Fourteen theme.

First, go to the topic list and create a folder with the new topic. You can call it whatever you want. In my example, I’ll call the topic twenty-fourteen-child. Now create a stylesheet file. It must be named -style.css. Copy the code from the image and paste it into the file you created.

Important items in the code that you notice are Theme Name and Template.

“Theme Name” tells WordPress what your theme is called. This name will be displayed in the “theme selector” section. The “Template” tells WordPress which theme is the original. At this point, your theme should work. Please check this by activating it and reloading your page.

Load the parent file’s stylesheet to add to the list. This should be in the functions.php file. Copy the following code into this file.

Fig. 4

If you haven’t even figured out PHP, but want to make a few changes, don’t worry. It will go. Go to the stylesheet file and change what you need.

However, there is one exception that confirms this rule, the functions.php file. This file is loaded in both existing and derived themes. If the derived theme function is subordinate to an existing theme, you will need to copy and paste the entire content from the functions.php file into the derived theme. To edit the header, copy and paste the header.php file into the derived theme.

How to properly adapt a derived topic?

As I wrote above, creating a grandchild theme is not possible, but I assume the couple you will want to change for sure. Let’s say the font or color. There are two ways to customize such themes without losing the changes you made before updating WordPress.

1. A custom CSS module

If you have made changes to the CSS, I recommend that you install your own CSS module. It allows you to create changes through the Customizer and save them to the database.

2. Use a custom PHP file

If your customization includes PHP, you will need to load your own php. file. A theme customization module is written especially for this topic, which can handle this type of modification without major problems.
This module loads the functions.php file, which you can handle in the same way as the functions.php file in the derived theme. It also loads stylesheet files and javascript. So you can add any CSS or JS and make your own goodies with them.

WordPress also offers several tutorials on the topic of creating a derived theme. Take a look at one of them.

In addition, I found two great modules, Child Theme Creator by Orbisius and Child Theme Configurator for less experienced WordPress users. The first of the modules is great for creating and editing a derived theme. The second of the modules does basically all the work for you. Not only does it create the desired derived theme, but it also copies everything from the folders and subfolders needed to access the existing theme.

A derived topic is the perfect solution for someone who wants to create their own e-shop quickly and without having to make major changes to an existing topic.

I hope this post has helped you with the issue of derived topics. Of course, if you have further questions, do not hesitate to share them in the comments.

Was this article helpful for you? Support me by sharing, please. 👍
WordPress Návod v PDF


Please enter your comment!
Please enter your name here