[![What Is a Child Theme 1](https://coma.lv/wp-content/uploads/2025/10/child-theme.webp)](https://coma.lv/wp-content/uploads/2025/10/child-theme-1030x579.webp)

# What Is a Child Theme

Oct 17, 2025/by [Vadim Pavlovich](https://coma.lv/en/author/djcoma/)

A child theme in WordPress is a sub-theme that inherits the functionality, structure and styles of a parent theme. It lets you make changes safely without touching the files of the original theme. When the parent theme is updated, all the edits you made in the child theme keep working, and the update does not erase your changes. That is why working through a child theme is considered a reliable way to customize. You do not change the parent theme’s files; you create overridden versions of them in the child theme.

To create a child theme, you need to create a separate folder inside the themes directory. The main file without which it will not be recognized is **style.css**. Its header specifies the parent theme through the Template parameter, which must exactly match the name of the parent theme’s folder. After the child theme is activated, its styles are loaded on top of the parent’s styles, so you can override any CSS rules. The parent theme continues to work fully, providing the functionality you have not changed in the child theme.

## Example of a correct child theme style.css file

/* Theme Name: My Child Theme Theme URI: https://example.com/ Description: Child theme for the Twenty Twenty-Five theme Author: Your Name Author URI: https://example.com/ Template: twentytwentyfive Version: 1.0.0 Text Domain: my-child-theme */ /* Ваши пользовательские стили */

**Important:**
Template: must be *exactly* the name of the parent theme’s folder. For example, if the theme is located in /wp-content/themes/twentytwentyfive, then Template: twentytwentyfive.

## Example functions.php for loading the styles correctly

Although a child theme can work without its own functions.php, in practice it is almost always needed — first of all to load the parent theme’s styles.

&lt;?php add_action( &#039;wp_enqueue_scripts&#039;, &#039;my_child_theme_styles&#039; ); function my_child_theme_styles() { // Подключаем стиль родительской темы wp_enqueue_style( &#039;parent-style&#039;, get_template_directory_uri() . &#039;/style.css&#039; ); // Подключаем стиль дочерней темы wp_enqueue_style( &#039;child-style&#039;, get_stylesheet_directory_uri() . &#039;/style.css&#039;, array( &#039;parent-style&#039; ) ); }

## Child Theme File Structure

The minimal structure looks like this:

my-child-theme/ │ ├── style.css ← обязательный файл ├── functions.php ← подключение стилей и пользовательский код └── screenshot.png ← (необязательно) миниатюра темы в админке        You can add any files to the child theme with the same structure as in the parent. If a file exists in both the parent and the child theme, the child’s file is used.

Example of a template override:

my-child-theme/ └── header.php ← заменит header.php родительской темы

## theme.json Support in Child Themes

If the parent theme is a block theme (FSE), it uses a theme.json file. In a child theme you can create your own theme.json — it:

- does not replace but supplements and overrides the parent theme’s settings
- lets you change colors, typography, block settings, templates and much more

Example of a minimal theme.json in a child theme:

{ &quot;version&quot;: 2, &quot;settings&quot;: { &quot;color&quot;: { &quot;palette&quot;: [ { &quot;name&quot;: &quot;Брендовый цвет&quot;, &quot;slug&quot;: &quot;brand&quot;, &quot;color&quot;: &quot;#0066ff&quot; } ] } } }

---

*Our specialization is WordPress website development and maintenance. Contact us for a free consultation — [vadim@coma.lv](mailto:vadim@coma.lv), [+371 29394520](tel:+37129394520)*

---
