Get a Website. Simply phone 01492 621076

Child Themes

Child themes for a Wordpress site are very simple and are the best way of tweaking a theme to the way you want it. Use it to just alter one element or do a complete redesign.

All Child themes start life the same way.

Create a new file in your text editor and enter the following:

Start of code :-


/*

Theme Name: My Child Theme

Theme URI: http://put-an-address-if-you-have-one.com

Description: Put a description here

Author: Your Name

Author URL: http://put-an-address-if-you-have-one.com

Template: name of parent theme folder

Version: 1.0

Any general information such as licence statements and or plugin requirments.

*/



@import url(“../parent-theme/style.css”);

// NEW STYLES GO HERE

-: End of Code.

Save this in a folder and upload the whole folder to wp-content/themes

Go to Appearance > Themes and you will see your Child theme there, all you have to do is activate it and your site will look exactly as it did before.

Now add the styles you want to override.

How do we know which styles to override. View your site in FireFox and right click on the part of the site you wish to change and select Inspect element in this way you will know the styles which are currently having the effect you want to change and you can add these to your child theme from Appearance > Editor. Your style sheet will be there ready for editing. Add the new style after the line starting @import.

In this way you can play about all you want until your new styles produce your creative gem.


Accept Cookies?