How do you create a child theme in WordPress?

What is a child theme?

With a child theme you can make a variant of an existing theme without your changes being undone when the original ‘main’ theme is updated.

This way you can change the layout of a theme and adjust or add functions without touching the original theme.

How to create a child theme?

  1. Create a new folder via FTP in the folder: wp-content/themes/ bv:themex-child.
  2. Create a document style.css in this folder.
  3. Put this code at the top in this style.css:
    Theme Name: ThemeX Child
    Theme URI:
    Description: Theme X Child Theme
    Author: Your name
    Author URI:
    Template: ThemeX
    Version: 1.0.0
    Tags: place, here, your, tags, separated, by, commas
    Text Domain: themex-child
    @import url(“../themex/style.css”);
    /* =Put custom CSS below
    ————————————————– ———— */
  4. Adjust what applies to you. With the code @import url(“../theme/style.css”); load the styles of the original theme.
    Modify the CSS file as desired. Any style elements you use here will override those of the ‘main’ theme.
  5. Activating your child theme is done via view > themes in the WordPress backend.

You can of course continue to customize your style.css.

In addition to the style, you can also adjust template files. For example, if you want to customize your header.php, you do the same as with the style.css document above.

Do you need a helping hand in creating a child theme? A WordPress specialist in Antwerp will reach out to you.

Need help
with a topic?

Or looking for
something else?

Drop us a note

This field is for validation purposes and should be left unchanged.