


Introduction
A WordPress Child Theme is the best way to customize a theme (for example Blocksy) without losing changes every time the parent theme updates. This allows you to work safely, keeping a stable foundation while adding your own styles and functions.
Child themes are a simple yet powerful structure that protects the core while allowing you to experiment and add layers of applied knowledge. It’s like having a canvas always ready to be reinvented, without ever losing its original essence.
1. What is a Child Theme in WordPress?
A child theme is a WordPress theme that inherits the functionality and styles of another theme (the parent). It lets you add or modify CSS, functions, and templates without touching the parent. It preserves all customizations after each update. It enables a lightweight, modular, and creative workflow. In short: the parent provides the structure; the child is the space where customization and identity unfold.2. Why use a Child Theme?
- Changes made directly to the parent theme are lost with each update.
- A child theme adds an extra layer of security and independence to your project.
- It’s the recommended practice for websites aiming for continuity and growth.
3. Available options
- Reuse an old child: only recommended if the code is useful and can be cleaned.
- Create a new child from scratch (recommended):
- You only need two files:
style.css
andfunctions.php
. - It automatically inherits styles and functions from the parent.
- It provides a clean environment for customization with vision and control.
- You only need two files:
4. Creating a Child Theme step by step
Step 1. Minimum files
A child only needs:
style.css
→ identifies the theme and contains your custom CSS.functions.php
→ loads parent styles and functions and allows adding your own code.
Step 2. Folder structure
blocksy-child/
│── style.css
│── functions.php
Step 3. Content of style.css
/*
Theme Name: Blocksy Child
Theme URI: https://degalalab.com
Description: Example of a clean and optimized child theme
Author: deGalaLab
Author URI: https://degalalab.com
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-child
*/
/* Add custom CSS here */
Note: the field Template: blocksy
indicates the parent theme. The rest are informative and can be adapted to each project.
Step 4. Content of functions.php
<?php
/**
* Blocksy Child - functions.php
*/
// Load parent and child styles
function blocksy_child_enqueue_styles() {
$parent_style = 'blocksy-style'; // parent theme identifier
// Parent style
wp_enqueue_style(
$parent_style,
get_template_directory_uri() . '/style.css'
);
// Child style
wp_enqueue_style(
'blocksy-child-style', // internal child name
get_stylesheet_directory_uri() . '/style.css', // path to child
array( $parent_style ), // loads after parent
wp_get_theme()->get('Version') // handles cache busting
);
}
add_action('wp_enqueue_scripts', 'blocksy_child_enqueue_styles');
Code reading: first it loads the parent theme, then the child. This ensures customizations remain stable and sustainable over time.
Step 5. Installation
- Compress the folder into a
.zip
. - Go to WordPress → Appearance > Themes > Add New.
- Upload and activate the
.zip
.
Step 6. Result
- The site looks the same as with the parent theme.
- All customizations are done in the child.
- Parent updates don’t affect your changes.
5. Recommended code editors for Child Themes
- Visual Studio Code (VS Code) → complete, flexible, perfect for knowledge-based projects.✨
- Sublime Text → lightweight and fast.
- Notepad++ (Windows) → simple and effective.
- WordPress integrated editor → only for quick fixes.
- FTP / cPanel → useful to manage files directly on the server.
6. Practical mini-guide with VS Code
- Create folder
blocksy-child
. - Add
style.css
andfunctions.php
files. - Write the code shown above.
- Compress into
.zip
. - Install from WordPress.
7. Related documentation
- WordPress Child Themes – Official Docs
- Blocksy Docs – Child Theme
- Related content at deGalaLab:
Frequently Asked Questions about WordPress Child Themes
What is a Child Theme in WordPress?
How to create a Child Theme step by step?
style.css
and functions.php
. Then compress it into a .zip
and install it like any other theme. This guide explains all the steps in detail.