Skip to main content

How to Create and Use a WordPress Child Theme

A child theme allows you to modify a WordPress theme's features or appearance without affecting the original theme's core files. This ensures that your customizations remain intact when the parent theme is updated.

A child theme allows you to modify a WordPress theme's features or appearance without affecting the original theme's core files. This ensures that your customizations remain intact when the parent theme is updated.

Before you begin

You will need:

  • Site Administrator access to your WordPress dashboard.

  • Access to a file manager (such as the one provided in your hosting control panel) or an FTP/SFTP client.

  • A clear understanding of which parent theme you intend to customize.

Create the child theme folder

  1. Log in to your hosting control panel and open the File Manager.

  2. Navigate to the directory where your WordPress themes are located (typically public_html/wp-content/themes/).

  3. Create a new folder for your child theme.

  4. Name the folder using a descriptive name, such as parent-theme-child.

Create the child theme files

  1. Inside your new child theme folder, create a new file named style.css.

  2. Open style.css and add the following information, replacing the placeholders with your specific details:

/*
 Theme Name:   Parent Theme Child
 Template:     parent-theme
 Author:       Your Name
 Description:  A child theme for the Parent Theme.
 Version:      1.0.0
*/

  1. Create a second file in the same folder named functions.php.

  2. Open functions.php and add the following line to ensure the parent theme's styles are loaded:

<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}

Activate the child theme

  1. Log in to your WordPress dashboard.

  2. Navigate to Appearance > Themes.

  3. Locate your new child theme in the list.

  4. Click Activate.

Confirm the result

  • The site should load using the child theme.

  • You can verify this by navigating to Appearance > Themes; the active theme should display as your child theme.

  • Any changes made to the style.css or functions.php files in the child theme folder will now be reflected on the site without affecting the parent theme.

What this does not mean

Creating a child theme does not automatically copy the content or settings of the parent theme. It only inherits the functionality of the parent theme. If you need to add specific features or unique styles, you must do so within the child theme's files.

Did this answer your question?