Easy to make WordPress Child Themes.

300x23childthemeposter

Here is an easy to make WordPress Child Theme that you can add to any WordPress theme in under 10 minutes!

 

Themes are what we all love and hate about WordPress. WordPress Themes can add quick functionality and style to an otherwise boring web page. There are thousands to choose from and the selection process can make your dizzy. What frustrates most, if not all WordPress theme users though, is not being able to “paint outside” the themes default settings. By adding a simple Child Theme to your WordPress theme of choice, you can overwrite CSS style sheets safely and add any customization you want. You need to know a little basic CSS, or you can hire CSS front-end designers to help you out, here at Barcelona WordPress.

You must have a WordPress theme installed for this to work. For this example we will use the TwentyFifteen theme as the Parent to our Child Theme.

To make a Child theme simply create a new folder under the WordPress themes folder, and give the child theme folder a name.

Next, open any text editor and create a new style.css file using the fields in the examples below. The file name must be: style.css be careful of course, to add the exact name of the parent theme you are using:

The code starts with a comment /* and ends with a comment */ . Then you add: Theme Name, Description, Author, Version and Template – These can all be named anything you like except for Template! WordPress sees this information and will create a child theme, provided the name of your WordPress theme is written after Template, like this Template: twentyfourteen. It is important to note that the theme template name must be written all in lower case or it will not work!

/*
Theme Name: Child of Twenty Fifteen
Description: Cool Child Theme based on Twenty Fifteen
Author: Michael Paragon
Version: 0.01
Template: twentyfifteen
*/

The last important part of creating the child theme is to add the following line of core code information to your stylesheet.

@import url(‘../twentyfifteen/style.css’);

This tells WordPress to import the style.css file of your theme you only need to add your theme name in lower case like so:

@import url(‘../themename/style.css’);

Completed our new style.css file looks like this:

/*
Theme Name: Child of Twenty Fifteen
Description: Cool Child Theme based on Twenty Fifteen
Author: Michael Paragon
Version: 0.01
Template: twentyfifteen
*/

@import url(‘../twentyfifteen/style.css’);

You can also add a custom image to your Child theme by adding a 300×225 .png and placing it in your new theme folder this should be renamed to: “screenshot.png”.

Give it a try and you will see how easy it is to create a Child Theme for your WordPress website in under 10 minutes!

For more information about customizing your WordPress themes contact Michael Paragon, at BCN-WP.COM