As everyone knows, WordPress is an open source CMS, allowing users to customize it, especially the interface. However, when you edit the wordpress theme, there are 2 problems that occur. One is that you can code wrong somewhere, causing the theme to fail to work. Second, every time the theme is updated, your changes will be lost. To solve these two problems, we use the Child theme creation method.
Child theme is a form of child theme, inheriting the entire design from the parent theme. The child theme does not need to contain all the files and folders, it can access the necessary files from the parent theme. When activating the child theme, the Website will prioritize using the design from the child theme first. This means, the website will read the content from the child theme, the files that are missing it will continue to read from the parent theme.
When updating the parent theme, the content of the child theme does not change. Conversely, when you edit the child theme will not affect the parent theme. This allows you to customize and edit an interface without worrying about affecting the original interface, as well as without fear of losing content when updating the interface.
Instructions to create a child theme for any interface
WordPress theme folders are usually located in wp-content/themes .
For example, now I have a parent interface located in a folder named store99 . Create a directory for the structure ” parent interface name” and “-child” . For example, here I create a folder called store99-child .

In the store99-child folder , I created 3 files: screenshot.png is the file I copied in the store99 folder to make the avatar for the child theme. 2 files functions.php and style.css I use notepad or notepad++ to create them.

Then, in the style.css file , paste the following code and save it:
/* Theme Name: store99 Child Template: store99 */<div> <span>1</span><span>2</span><span>3</span><span>4</span> </div>
Here, I declare Theme Name as the name of the child theme including “parent interface name” and “Child”. And Template is “the name of the parent interface”. You must use the correct name of the parent interface for the child theme you create to work. You can edit the “parent theme name” according to the theme you use to create the child theme.
Then, for this interface to have access to the parent interface’s styles.css file, which is located in the store99/style.css directory , you need to declare it in the function.php file that you created above as follows: :
<?php add_action( 'wp_enqueue_scripts', 'my_enqueue_assets' );
function my_enqueue_assets(){
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?><div>
<span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span>
</div>
You just need to copy the above code and paste it into the function.php file without any modification. Then save this file.
Now go to your WordPress site Dashboard, then to the Appearance menu . Here, you will see a new interface called store99 Child like I just created. Please enable this interface.

Then, go to the homepage, see it showing the orderly layout and color as when activating the parent interface is successful.

summary
Above is the simplest way to create a child theme for any theme. However, sometimes you will encounter a “coffee” interface, do the same but it doesn’t work. Don’t hesitate to leave a comment to ask, I will help.
After creating the child theme, if you need to edit any file of the parent interface, copy it to the child theme and edit it. Note that copy the entire directory structure of that file. Edit any file to copy that file, no need to copy all the files in the folder. At the same time, you can also add files and messages to the child theme. If the code structure is correct, the website will also execute these files of yours. Or you can write the code in the function.php file in the child theme.
Good luck!

