Search
Close this search box.

How to Create a WordPress Child Theme

A child theme in WordPress is a sub-theme that inherits the functionality and styling of a parent (main) theme. It allows you to make changes without editing the original theme’s files.

You can add custom code to the main theme’s functions.php file, and it will work. But this is not a good idea because when the main theme updates, your custom code can be erased.

Also, changing the main theme’s functions.php file can mix up your code with the original code or cause mistakes, which might break your website.

A child theme creates separate functions.php and style.css files where you can safely add your code without affecting the main theme. This way you can safely add your custom codes.

Steps to Create a Child Theme

Step 1: Install a Child Theme Generator Plugin

Step 2: Generate the Child Theme

  • Hover on Appearance, then click on the Child Theme Gen option.
child theme generator
  • Select your main (parent) theme from the dropdown.
  • Check the Create & Activate box
screenshot 3 01
  • Leave everything else as it is.
  • Click on the Create Child Theme button.

That’s it. The child theme has been successfully created.

To check go to Appearance>Themes. You will see the child theme activated.

Note: You can deactivate the WP Child Theme Generator plugin if you want. Deactivating it will not delete the child theme.

Share

Twitter
Facebook
LinkedIn
Reddit
Pinterest

Related Posts

Toufique Alahi

Hi there! I enjoy writing about WordPress and sharing my hands-on experiences. I explore new features, tips, and tweaks. Stick around for helpful tutorials and insights!

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.