Child themes - why and how to use them

At ProteusThemes we always make sure that our new themes ship out with a bare bone child theme so that our users could make use of it from the start. There are some big benefits in using a child theme, that we will get into later, but first let’s take a look at where you could find the child theme files that you can use.

  1. Go to themeforest.net/downloads and click on the Download button and then select All files & documentation



  2. Extract that downloaded zip file and in the extras folder you will discover the <theme_name>-child folder with two files in them: functions.php and style.css



  3. Upload <theme_name>-child folder to your server in wp-content/themes/ , so for example, if you are using our CargoPress theme the uploaded folder would have this path:
    wp-content/themes/cargopress-pt-child/
  4. Login to your WordPress admin dashboard and go to Appearance -> Themes and activate the child theme.
  5. Usually, the widgets get reshuffled (e.g. footer widgets may end up in header are, etc.) after activating a child theme, so please go to Appearance > Widgets and restore them back to normal.
  6. If you've made any customizer settings prior to the switch, you need to migrate those settings to the child theme. Customizer Export/Import plugin is a free, simple and efficient way to do this.

That’s it, you are now using a child theme!

Now, let’s take a look at why using a child theme is a great idea!

Safe updates: the biggest reason to use a child theme is that you can easily update the parent theme and no changes that you added to the child theme will be lost. This means that you can keep the parent theme up to date at all time, without worrying of losing custom code in the child theme.

Easy Customization: the child theme is used to store improvements, additions or changes to the parent theme. So custom CSS would go to the child theme style.css file and the PHP code would go to functions.php file. With a child theme there is a clear devision of code from the parent theme and so you always know what changes you made to the theme.


More official information on child themes can be found here: WordPress Codex, but if you google for “WordPress child theme” you will find more tutorials on how to set them up than you could ever read through :)


Have more questions? Submit a request

Can't find what you're looking for?

Submit a ticket to our help team or Start a new community discussion.

Comments

Can't find what you're looking for?

Submit a ticket to our help team or Start a new community discussion.
Powered by Zendesk