Child Theme

Overview

A child theme tin be used to add extra functions to your site without modifying the chief theme files. This gives yous an encapsulated space to store your own modifications.

We highly recommend installing the child theme from the kickoff because if there is a need for custom modification in time to come it's the all-time way to ensure that whatsoever changes you brand to the child theme files are saved without the gamble of a theme update writing over your piece of work. The WordPress Codex provides an excellent overview for those new to this topic, including a comprehensive section on how to create a child theme.

How child themes work

A WordPress theme can be enhanced with additional features and this may sometimes crave hard-coding the theme files. Hard-coding a parent theme file may consequence in a loss of all the custom lawmaking every bit the files are overwritten with new version during a theme update.

A child theme is designed to store the theme files without losing the modifications during the update process. Information technology runs on a parent theme simply when a copy of the parent theme file is added to the child theme directory, automatically WordPress gives priority to the files in the child theme folder.

Usage example:

Ok! Let'southward endeavor to add a custom tag in the head section of the header.php file.

If we hard-lawmaking the header.php file in the parent theme directory. When a theme update is released the theme files will be overwritten resulting in a total loss of all the modified files.

To display a tag in the head section of your site we can copy the header.php file from the primary theme wp-content\themes\enfold into the kid theme directory wp-content\themes\enfold-child and alter the head section.

How to install the child theme

Let's accept a look at the dissimilar means we can install and activate a child theme on your site. Installing a kid theme requires you to already have the primary Enfold theme running on your site.

What is required?

Install a child theme from your WordPress dashboard

Outset download the kid theme every bit mentioned before. Upload it to your site from WordPress Dashboard > Appearance > Themes > Add New

Click the "Add New" push button on peak of the "Themes" page.

In the adjacent screen, the "Upload Theme" options volition appear.

In one case you click on the "Upload Theme" option, click the "Choose File" and browse the enfold-child.zip file to Install.

After selecting the kid theme file, click the "Install Now" button.

If all goes besides, an option to activate the theme volition appear.

Get ahead and click on the "Activate" link to start using the child theme. If everything went smoothly you will find the Enfold theme options folio. You can also verify the child theme is active past going to WordPress > Appearance > Themes

To switch from Enfold parent theme to the child theme and retain your same settings, please follow these steps:

1- With your parent theme active, become to Enfold Theme Options > Import/Consign > Consign Theme Settings File and download your theme settings file for fallback.
2- Activate your child theme and ensure your Enfold Theme Options > Performance > JS & CSS file merging and compression is turned off along with any caching plugins.

iii- Go to Enfold Theme Options > Import/Export > Import Settings From Your Parent Theme and import

4- Get to your homepage and articulate your browser cache a couple of times and check that the settings have taken upshot.

If information technology doesn't look quite right, then check that your Enfold Theme Options > Performance > JS & CSS file merging and pinch is turned off and clear your browser cache a couple of more than times.

If yet non quite right, and then go toEnfold Theme Options > Import/Consign > Import Theme Settings File and upload the theme settings file yous saved earlier for fallback and clear your browser enshroud a couple of more times.

Install a child theme using FTP

Download the enfold kid theme file (enfold-kid.zip) and extract the "enfold-child" binder.

Log into your FTP business relationship using an FTP plan like FileZilla. If you do not have an FTP business relationship nonetheless login to your hosting command console and create a new FTP business relationship. Upon connecting to an FTP server successfully, the folder structure of the remote server can exist browsed on the FTP client.

Locate the WordPress installation folder and browse to wp-content/themes. Drag and drib the "enfold-child" binder which we extracted earlier into the remote server window on your FTP customer.

Both the parent and kid theme should display in Appearance > Themes page. Go alee and activate the "Enfold Kid" theme. If all goes well y'all will be re-directed to the theme options page. You can also verify the agile theme from WordPress Dashboard > Advent > Themes.

Related Topics

  • Add custom CSS to your Enfold kid theme.
  • Add a custom part to your kid theme functions.php file.
  • Register your theme with an Envato personal token.
  • Import/Export theme settings from the parent theme.