Adding a WordPress Child Theme

Benefits on adding a child theme.

By adding a child theme to your WordPress theme you won't lose any customizations or style modifications that you've added to the theme every time a theme update is released with new security improvements, fixes or new features.

You will be able to add all your styles and modifications to your child theme without the need to dig into the dozen of main core theme files, having a child theme is a must if you are going to modify and customize your theme.

Download and activate the free  Childify Me plugin

  1. Go to Appearance > Customize. There, you’ll see a new link added by the plugin in the text description’s footer.
  2. Click on the button Childify Me
  3. Name your child theme
  4. Go back to Appearance > themes, find your freshly created child theme and activate it. You are done!

Note : The Childify Me plugin creates a style.css  and a function.php files. If you want to add custom functions or templates in new folder/files, you can either upload them by FTP or use the following plugin to easily manage your files right from admin :

How a child theme will load your files first?

When a child theme is created and activated, WordPress will compare the child theme and main theme core files, every time a file is matched the child theme file will be loaded first and it will execute the content of thta file in the child theme instead of the file in the main theme.

WordPress pluggable functions for child themes.

You can create pluggable functions in your WordPress theme and then add the same function in your child theme to overwrite the function in the main WordPress theme.

if( !function_exists('name_of_your_function') ) { function name_of_your_function( $args ) { // function code goes here } }<br>

When WordPress finds the function in parent functions.php, if the function exist it will get skipped and the child theme function will be loaded first.

Additional documentation about the use of WordPress child themes.

Still need help? Contact Us Contact Us