Total Theme Child Theme

A child theme is essentially a theme you install to WordPress but doesn’t have any template files or CSS by default. Instead it pulls all the code and data from it’s “parent” theme (Total). If you want to add custom CSS or make alterations to the Total theme you could manually edit the theme, but if you ever want or need to update the theme then you will lose all your hard work because when you update a theme it replaces all the theme files. However, if you are using a child theme when you update the parent theme (Total) all your custom code will remain in the child theme and you won’t lose any of your edits – yay!

A full guide to child theme’s is available here for further reading and you should also check out the WordPress CODEX documentation.

When do I NOT need a child theme?

If you are only planning on making small CSS edits to the theme then you can add them at Theme Panel > Custom CSS and you don’t have to install a child theme for that and there is actually no reason to do so. Or if you are going to use a plugin such as the Code Snippets plugin to make advanced edits.

When do I need a child theme?

If you plan on making advanced modifications such as altering theme hooks or filters, making use of any of the available snippets or altering any partial template files then you will want to install and use a child theme unless you prefer to use a plugin for these edits such as the Code Snippets plugin (awesome plugin that lets you manage your custom tweaks in the WP admin).

Sample Total Child Theme (download)

All WordPress child themes are created the same way in WordPress and if you are using a child theme you really should be familiar with how to create one but to speed things up I’ve made a sample child theme for you that you can then tweak accordingly (add your screenshot, edit the name, etc).

Download Sample Child Theme

IMPORTANT: Switching To Child Theme Notice: If you have NOT been using a child theme and are going to switch to one now, it’s very important to realize that all theme mods (Customizer settings) are saved in the database under a table using the name of your theme so if you switch to a child theme you won’t lose your settings but they won’t apply, so make sure to export and import your customizer settings when switching over. If you didn’t do this…switch back to the parent theme, grab your settings then switch back to the child theme.
Information: When you download the Sample Child theme you CAN rename the zip file so it’s uploaded to your server with whatever unique name you want and it matches your site. But make sure your name doesn’t have any spaces.

Making Template Edits

When making edits to template files in the Total theme it’s important to first ask yourself…do I have to edit this file? Total includes a lot of built-in filters and action hooks so you can make a lot of edits via the child theme functions.php file. By using filters and hooks you won’t have to worry about keeping track of modifications to the template files in the parent theme when the parent theme is updated. Have a look at the available snippets for the theme. And if you aren’t sure the best way to edit something please leave a comment on ThemeForest and we can provide you with feedback or even make a custom snippet for you.

Partial Template Files

If you do prefer to alter template files rather then using hooks/filters as mentioned in the paragraph above that is ok. All the core output for the Total theme is located at Total/partials/ so you will want to create a blank partials folder in your child theme and then copy the file you want to edit inside that folder keeping the same structure. For example if you want to edit the header aside content this file is located in the parent theme at Total/header/header-aside.php so you will need to create a partials folder in your child theme, then inside of that folder create a header folder then inside that copy and paste the header-aside.php file from the parent theme. When you use the same structure as the parent theme WordPress will find that file and use it instead of the file in the parent theme.

Important: When you make partial template modifications you need to be aware that things can change in future updates and you may need to manually modify these files whenever the theme updates the file in the parent theme. This is why it’s best to NOT modify the theme files but instead use theme hooks/filters as noted above.