How To Create WordPress Twenty Twenty Three Child Theme?

Are you using the WordPress Twenty Twenty Three theme and looking to create a child theme? If so, you’ve come to the right place. In this article, I’ll guide you through three methods for creating a WordPress child theme. But before we delve into the creation process, let’s first understand what a child theme is and why you should use that. So, stay tuned until the end of this article to learn everything you need to know.

What Is A Child Theme?


A child theme is a kind of clone theme or sub theme that copies the look, feel, and functionalities of the parent theme. The process of installing a child theme is the same as the parent theme but the difference is that the child theme relies on its parent theme.

Why You Need To Use A Child Theme?


I know you are keen to know why you need to use a child theme. Well, if you want to customize your WordPress theme by editing WordPress files directly then using a child theme is the safest way. The reason is that, when your WordPress theme get an update and when you update your theme then it will overwrite all the customization resulting in you losing all your customizations. Therefore, to avoid this issue, it is advisable to use a child theme.

I hope you now understand why it’s necessary to use a WordPress child theme.

Benefits Of Creating A Child Theme


Here, we will discuss the benefits of creating a child theme. We already discussed that if we customize the parent theme directly without using a child theme then you’ll lose all your customization when you’ll update the parent theme.

So, the following are the benefits of using a child theme:

  • By using a child theme you can modify your theme at risk-free environment. The reason why I am telling you is that if you customize your child theme and something goes wrong then you need to simply deactivate that theme and activate the parent theme that’s it. By doing this, you’ll restore your website to its original state.
  • Next, keeping the customizations in a separate child theme folder that you’ve made makes it easy to replicate or use them on your other websites.

Okay so now you have a better understanding of why you need to use a child theme and what are the benefits of creating and customizing a child theme. So, now without taking too much time let’s go through the process of how to create a WordPress twenty twenty-three child theme.

Also Check Our: Complete Guide On WordPress Twenty Twenty-Three Theme

How To Create WordPress Twenty Twenty Three Child Theme?


There are three ways to create a WordPress Twenty Twenty Three child theme. The first one, which is my favorite, involves using a plugin. This method is one of the easiest ways to create a child theme, even for beginners. The second method is also the easiest one which is to use an online child theme generator. The third method is a bit technical which is to create a child theme manually. If you’re not familiar with WordPress files, it might be a little challenging. However, if you do have some knowledge, it won’t be too difficult.

So, let’s begin with the first method which is to use a plugin.

Method 1: Using WordPress Plugin

There are many plugins available for creating a child theme, but Create Block Theme is my favorite plugin.

To create a child theme using this plugin, first, you need to add and activate the plugin. Once activated, you’ll see the option ‘Create Block Theme’ under the Appearance tab.

Now, you need to click on that, and a page will open where you can see several options. We need to select the second option, which is ‘Create child of Twenty Twenty-Three‘.

Once you select that option, it will display several options, as shown in the image below. In these options, the Theme Name is required, where you need to enter your theme name, business name, or any other desired text. Other than that, if you leave the rest field blank, it’s fine.

Wait, apart from creating a child theme this plugin also provides you the option to manage fonts in your FSE (Full Site Editing) theme, such as adding Google fonts or local fonts.

After filling out all the details, click on the Generate button. That’s it! Your child theme is now ready to use.

Method 2: Use Online WordPress Child Theme Generator

Apart from plugins, there is another easy option available: an online WordPress Child Theme Generator website. This is one of the most popular WordPress Child Theme Generator websites.

Once the website is open, simply enter some of the required information such as the name and slug of your parent theme, the name and slug of your child theme, etc. The best thing about this website is that if your parent theme is listed on the WordPress.org repository, it will automatically display the theme name when you enter the theme name.

Method 3: Create a Child Theme Manually

If you are a newbie and have limited knowledge about WordPress and its files, it’s important to follow each step carefully as outlined below. This method will provide you with a better understanding of how the child theme works. I’ll guide you through each step, making it easy for you to understand and follow along.

Basically, to create a child theme, we only need two files, which are:

  1. Style.css
  2. Functions.php

Apart from this, if you want to make any changes to other theme files then you’ll also need those files. However, we’ll discuss that in detail in this section.

Step 1: Create A Child Theme Folder

First things first, create a child theme folder where you can store all the files. Give it a name by appending your parent theme’s name with “child” (e.g., twentytwentythree-child) or any other name you prefer.

Step 2: Create A Style.css or Stylesheet For A Child Theme

Now, you’ll need to create a Style.css file inside the child theme folder. In the style.css file, we’ll need to add a header comment at the top.

This is a very important step because it declares basic info along with which parent theme we are using and this is how the child theme connects to the parent theme. If you are not familiar with and have no idea about how to create the CSS file, you can use any text editor such as Notepad, etc.

In the comment, two elements are very important, which are the following:

  • Theme Name: Here, you’ll need to add your child theme name. It could be anything, whether it’s a website name or a theme name with “-child” like “twenty-twenty-three-child” or anything else you prefer. For demonstration purposes, I’ve added “Modern WP Theme Child” here.
  • Template: Now, you’ll need to add the name of your parent theme folder. This step is crucial as it links the child theme with the parent theme. For instance, if you’re creating a child theme for the WordPress Twenty Twenty Three theme, you should add “twentytwentythree” for the Template. If you’re creating a child theme for a different theme, you’ll need to add the respective theme folder name for the Template.

These two elements are crucial and required for a child theme to function properly.

Apart from this, there are few other information which also needs to be included but it is not compulsory such as Theme URI, Author, Author URI, Description, Version, and Tags. I recommend you to fill in all this information although it is not required. I understand that you may be wondering how to write that header comment, am I right? Well, here I’ll show you how to write that, so don’t worry about that.

/*
Theme Name: Twenty Twenty-Three Child
Theme URI: https://example.com/twenty-twenty-three-child/
Author: WordPress Team
Author URI: https://example.com
Template: twentytwentythree
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, responsive-layout, grid-layout, left-sidebar, right-sidebar
Text Domain: twenty-twenty-three-child
*/

You may notice slashes and asterisks before and after the comment. This is a CSS comment, indicating that WordPress does not execute that code. If you want to add your CSS then you need to add that after this comment. But for now, save this style.css file in your child theme folder.

Step 3: Create a Functions.php File To Enqueue the Stylesheet

Now, in this step, we’ll enqueue both the parent and child themes’ stylesheets in the functions.php file.

By doing this, two things will be ensured:

  • The first thing is that after enqueuing the stylesheet, when we activate the child theme, it will automatically use the parent theme’s styling. This means you won’t see just plain text without any design; instead, it will look like the parent theme’s design. So, with this kind of flexibility, you can customize the theme’s design according to your needs.
  • The child theme’s enqueued stylesheet is loaded before the parent theme’s stylesheet, but it doesn’t overwrite it. It means when you customize your child theme by adding custom CSS or functions, those changes will only replace that specific styles and functions in the parent theme.

By using the following code we’ll enqueue the stylesheet in the functions.php file.

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

In most cases, the above code works properly, but if your theme is not coded according to the WordPress code conventions, it might not work as expected. So, in that case, try to use one of the above method.

How To Use/Customize WordPress Twenty Twenty Three Child Theme


For modifying your parent theme, there are three most important files you’ll need in your child theme folder:

  1. Style.css
  2. Functions.php
  3. and a Templates file

1. Style.css

To customize the parent theme, you’ll need to add CSS to the style.css file in the child theme’s folder. This is how you can make changes to your theme’s color, spacing, or any other design elements in your parent theme. Once you add your CSS code to the child theme’s style.css file, it will automatically overwrite the parent theme’s stylesheet.

2. Functions.php

To add custom PHP functions, enqueue stylesheets and scripts, overwrite parent theme templates, and configure other settings of the theme, you’ll need a functions.php file in a child theme folder.

3. Custom Template File

Now, you can modify the parent theme templates using the child theme. To do so, you have to copy the desired template file from the parent theme into the child theme folder. For example, if you want to modify the design of a single blog post, you would copy the single.php file from the parent theme into the child theme folder and then make your modifications according to your requirements.

To modify anything in your theme, first, check which template is being used for that particular element. Then, copy that file to the child theme folder and start customizing/modifying it.

Final Thoughts

That’s it! Now you know how to create a WordPress Twenty Twenty Three Child Theme. Hopefully, you understand the importance of using a child theme instead of a parent theme. With a child theme, you can make modifications without risking any mishaps. Plus, it ensures your customizations remain intact even when themes are updated.

While creating a child theme if you’ll face any issues, feel free to contact me I’ll help you out.

Rupesh Hingu
Rupesh Hingu

I’m Rupesh Hingu🚀, the founder and curator of ModernWPThemes.com. With a passion for WordPress that runs deep, I’ve dedicated this platform to helping you navigate the ever-evolving world of WordPress. Connect with me on LinkedIn, follow me on Twitter or Facebook.

Articles: 95

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.