If you are planning to customize your WordPress website, then creating a child theme is one of the most important things you should do.
Many beginners ignore this step and directly edit the parent theme files. This works for some time, but the moment the theme gets updated, all the changes are lost. That can be very frustrating.
In this blog post, I’ll explain what a child theme is, why it is important, and how you can create a child theme step by step without using any plugin—in a very simple way.
Why Should You Create a Child Theme?
Let’s understand this with a simple example.
Suppose you customize your website by editing the files of your main (parent) theme. Everything looks perfect. But after some time, the theme developer releases an update, and you update the theme.
👉 As soon as the update happens:
- All your custom code is removed
- Your website design goes back to default
- Your hard work is completely lost
Now imagine using a child theme.
When you put your custom code inside a child theme:
- Parent theme updates do not affect your changes
- Your design and code stay safe
- You can customize your website without fear
That’s why professional developers always use child themes.
What Is a Child Theme?
A child theme is a separate theme that depends on a parent theme.
It automatically uses:
- All the design
- All the features
- All the functionality
from the parent theme.
At the same time, it allows you to:
- Add your own CSS
- Add custom PHP code
- Modify templates safely
What We Need Before Starting
Before creating a child theme, make sure:
- WordPress is already installed
- The parent theme (example: GeneratePress) is installed and active
- You have access to your website files (via hosting or localhost)
Step 1: Create a Child Theme Folder
First, go to your WordPress theme directory.
If you are using localhost, the path will look like this:
htdocs → your-project → wp-content → themes
Inside the themes folder, create a new folder.
Give it a name like:
pixelo-child
You can name it anything, but it’s better to keep it related to the parent theme.
Step 2: Create Required Files
Open your newly created child theme folder.
Now create two files:
functions.phpstyle.css
These two files are necessary for a child theme to work.
Step 3: Add a Screenshot Image
When you go to Appearance → Themes in WordPress, every theme shows an image.
To show an image for your child theme:
- Add an image inside the child theme folder
- Name the image exactly:
screenshot.png
⚠️ Make sure the spelling is correct. Otherwise, the image will not appear.
You can use any image you like.
Step 4: Add Code to functions.php
Now open the functions.php file.
Inside this file, we add code that loads the parent theme styles.
Don’t worry about writing the code yourself.
You can simply copy and paste the required code (I’ve shared it below).
<?php
//Enqueue parent and child theme styles
function our_pixelo_child_theme_enqueue_styles() {
//Load parent theme stylesheet first
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
//Load child theme stylesheet
wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style'), wp_get_theme()->get('Version') );
}
add_action( 'wp_enqueue_scripts', 'our_pixelo_child_theme_enqueue_styles' );
After pasting the code, save the file.
Step 5: Add Code to style.css
Next, open the style.css file and add this code at the top:
/*
Theme Name: Pixelo Child
Theme URI: https://www.engramium.com
Description: Child theme for Pixelo
Author: Aaron
Author URI: https://yourwebsite.com
Template: pixelo
Version: 1.0
*/
Important Things to Remember:
- Theme Name: Name of your child theme
- Template: Must be the folder name of the parent theme
- The parent theme must already be installed
Below this comment, you can add your custom CSS whenever you want.
Save the file.
Step 6: Activate the Child Theme
Now go to your WordPress Dashboard.
Navigate to:
Appearance → Themes
You will see your new child theme listed there.
Click on Activate.
What Happens After Activation?
Once activated:
- Your child theme will automatically use the parent theme’s design
- Your website will look exactly the same
- No changes will be visible yet—and that’s normal
Now, whenever you add:
- Custom CSS
- Custom PHP functions
- Template changes
You can safely add them to the child theme.
Final Words
Creating a child theme is a smart and safe way to customize your WordPress website.
It protects your work, saves your time, and keeps your website secure during updates.
If you are serious about WordPress customization, using a child theme is not optional—it’s essential.
I hope this guide helped you understand child themes in a simple and easy way.
If you have any questions, feel free to leave a comment.
Happy learning and happy building! 🚀



Leave a Reply