How to create child theme for your active theme WordPress open

How to create child theme for your active theme WordPress

Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators
Tested: WordPress 4.0+, PHP 5.6 +

Creating a child theme is a simple step that will allow you to update your active theme in the future without losing all the changes you have made to the template.

More about child theme

1 Step – Find out the name of your active theme

Go to the admin panel of your site yoursiteadress.com/wp-admin

Open themes in admin panel
Open themes in admin panel

Find active now in the theme directory:

Active theme in directory
Active theme in directory

Remember theme name.

2 Step – Create child theme directory

Connect to your site by FTP (We recommend FileZilla client)

Go to the directory /yoursiteadress.com/wp-content/themes/

Find the folder with your active theme

Active theme

Create a new empty folder and name it yourthemename-child

Child theme created

3 Step – Fill yours child theme

Copy style.csss file from your active theme and place it in the directory of your child theme

Open style.css file in the directory of your child theme and remove everything except the top annotated text.

Make small changes to it by adding to “Theme Name” – “child”

Also add a “Template” string in which you specify the slug of the parent theme:

/*
Theme Name: Yourthemename child
Author: Author
Template: yourthemename
Version: 1.0
*/

Now you can go to the admin panel of your site and activate a new child theme!

0

More

Leave a Reply

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

How many?: 22 + 22

lil-code© | 2022 - 2024
Go Top
Authorization
*
*
Registration
*
*
*
*