How To Make A WordPress Child Theme

wordpress child theme

How To Make A WordPress Child Theme

Many premium WordPress themes offer tons of features and functionality to allow you to easily customize your WordPress website without coding. However, because your business, your brand, and your identity is unique – you may find that your theme does not let you execute your exact vision. If you are planning to make changes to your WordPress theme, it is important to use a WordPress child theme. This blog post will help you understand what a child theme is and how to add a WordPress child theme to your website.

Why Use a WordPress Child Theme

The most important reason to use a WordPress child theme is to make sure your WordPress website remains update-to-date and your changes last over time. Many WordPress themes offer regular updates (just like an iPhone app) and they are important to install as they fix bugs, ensure the theme is compatible with the latest version of WordPress, and provide security patches.

If you make any changes directly to your purchased theme, you will lose these changes when you update this theme. Therefore, we use a child theme so that we can regularly update the purchased theme while keeping our changes over time.

How a WordPress Child Theme Works

The terminology follows a familial pattern. We have a parent theme – meaning your purchased theme – and the child theme. The child theme inherits all of the styling and functionality of the parent theme. Any changes made within the child theme will override the parent theme, allowing you to make (and keep) adjustments to your purchased theme.

All of the Pix & Hue feminine WordPress themes come packaged with a child theme. However, if your theme does not provide you with a child theme – follow the steps below to create one.

How to Make A WordPress Child Theme

For this example, we will use the WordPress Twenty Fifteen theme as our parent theme. To create a child theme, we will first need to create a folder titled twentyfifteen-child. Replace “twentyfifteen” with the name of the folder that contains your parent theme. You can double check name of the folder that contains your parent theme by visiting /wp-content/themes.

Inside the folder “twentyfifteen-child,” we will create two files: functions.php and style.css. First, the code to include in the functions.php file:

Next, the code to include at the very top of style.css. An important note – you must include the “Template: twentyfifteen” field, but again, replace “twentyfifteen” with the name of the folder that contains your parent theme. Complete the other fields based on your child theme, including the name, description, and author.

How to Use A WordPress Child Theme

To use your child theme, you must install and activate it on your WordPress site. To install the child theme, use a FTP client such as FileZilla and upload the twentyfifteen-child folder (containing our two files functions.php and style.css) to the /wp-content/themes folder.

Within your WordPress dashboard, visiting Appearance > Themes and Activate the child theme. You can now begin making changes to your WordPress theme and continue to update your parent theme without worrying about losing those changes!

No Comments

Post A Comment