Quantcast
Channel: Tom Rhodes
Viewing all articles
Browse latest Browse all 133

WP Basics – The World Of Child Themes

$
0
0

Sometimes when your using a theme, you may need to tweak, alter or extended the theme in anyway possible. Whilst the brave out there may just dive straight into the code and start ripping things up, its considered much better practice to give yourself a safety net, in the case of WordPress ‘themeing’, this is where the Child Theme comes into play.

What is a Child Theme?

A child theme is basically a theme which you install ‘above’ a parent theme – the idea being that you reference the parent theme within your child theme, and you can go ahead and begin replacing theme components such as post or page templates with your own.

An example of this may be if your theme comes with social sharing buttons which display on single posts – if you want to remove these from the source of the page, you could simply copy the parent themes single.php file into your child theme and remove whatever you wish. WordPress will then pick up on this change and use your specially created single.php instead!

Furthermore, with a child theme you can add/replace scripts and functions with ease (providing the parent theme has been coded to WPs standards). Although this is a little more tricky and involved for the basics we are covering today.

Creating a Child Theme

As with most things in WordPress-land, a plugin exists which makes this process very easy indeed. The plugin we recommend for this task is Child Theme Creator by Orbisius – to install it, you can follow this handy guide which is an earlier entry to your WP Basics series.

Once installed, you will need to head to Appearance > Child Theme Creator and select your parent theme from the themes listed (should you have more than 1 installed)

childtheme1

You will notice a number of options available, the ones you may be more interested are the ability to switch to your child theme upon its creation, and if your planning on customizing the functions, a fresh functions.php file can be created for your – Id recommend both here.

Once done, you will be setup with a fresh template which you can customize as you wish, leaving your parent theme in tact so your able to update worry free.

The post WP Basics – The World Of Child Themes appeared first on TommusRhodus.


Viewing all articles
Browse latest Browse all 133

Trending Articles