Yorgo Nestoridis

Latest Updates: Yorgo Nestoridis Media Marketing RSS

In order to add Themes, we just drop theme folders into the ‘themes’ folder as per above. As you can see, I have amongst others) added my Semiomantics XO (the ‘xo’ folder under themes). XO will serve as the parent theme of the new website. Instead however of customizing XO directly, I will create a child theme which will contain all modifications. The advantage is clear: when an update or upgrade of the theme becomes available, the parent theme can be updated without destroying the child and restarting the customization job from scratch.

id="Create_a_WP_Child_Theme_for_Semiomantics_XO">

Create a WP Child Theme for Semiomantics XO

A WordPress child theme consists first of all of a Folder to which we add a style-sheet.

This style-sheet contains a commented header which defines the parent theme folder as well as other optional data and it usually imports the parent theme’s style-sheet with a simple line of code (no need to copy paste the whole style-sheet). Also we will add a screenshot which will serve as a thumbnail in the Themes tab of our WP Dashboard.

id="attachment_23001" class="wp-caption alignnone" style="width: 470px"> href="http://yorgonestoridis.com/wp-content/uploads/2012/05/yorgo-12-1.jpg"> class="size-large wp-image-23001" title="Style-sheet for Child Theme" src="http://yorgonestoridis.com/wp-content/uploads/2012/05/yorgo-12-1-460x381.jpg" alt="Style-sheet for Child Theme" width="460" height="381" /> class="wp-caption-text">Style-sheet for Child Theme

As you can see above, I am editing my files using the free title="PSPAD" href="http://pspad.com" >PSPad which is handy to edit the various files we need to develop.

id="How_to_Create_a_Child_Theme_step_by_Step">

How to Create a Child Theme step by Step

1. Add a new folder to the WP Themes folder under wp-contents/themes; name it as you like your theme to be named, in my case: yorgo12

2. Create a new file called style.css using your editor and save it into the new theme folder.

3. Edit the style.css file by adding a commented section defining:

You could add other data as some authors do, such as Author’s URI and more, but that’s not necessary.

NOTE: All the above information sits between comment tags (/*.….….*/)

Next, we import the style-sheet of the parent theme with the following line of code:


@import url("../xo/style.css");

I have then added a comment to remind that you should not edit above unless you know what you do.

Your style.css file reads now similar to the following:


/*
Theme Name:       yorgo12
Theme URI:        http://semiomantics.com
Description:      Child Theme for Semiomantics XO 12
Author:           Yorgo Nestoridis
Template:         xo
Version:          1.0
*/
@import url("../xo/style.css");
/* Edit here below*/

Save the file into the new Child Theme folder.

4. Add a Thumbnail

Usually the image represents a screenshot of the new site but it can also be a brand logo or any other image. Important: the image should be called ‘screenshot’ and be in png format to fit into WP. Use image size 300px x 225px for best display.

id="attachment_23003" class="wp-caption alignnone" style="width: 310px"> href="http://yorgonestoridis.com/wp-content/uploads/2012/05/screenshot1.png"> class="size-full wp-image-23003" title="screenshot.png" src="http://yorgonestoridis.com/wp-content/uploads/2012/05/screenshot1.png" alt="screenshot.png" width="300" height="225" /> class="wp-caption-text">screenshot.png

Drop the image into the Child Theme folder.

Let’s now activate our new Child Theme from the WP Dashboard under Appearance/Themes.

What you will see is an out of the box XO when looking at the front-end of the site.

Having set the base for our custom development, we will start now to adapt the site to the needs of the hypothetical customer. Continue reading the next post.

No related posts.

 
« Previous PageNext Page »