IMPORTANT: Use a Child Theme

Any questions about styling and customising the layout, changing the number of columns, changing the number of sliding images and so on.

IMPORTANT: Use a Child Theme

Postby wayne » Sat Jul 28, 2012 12:04 am

If you plan on making any changes to the theme, use a child theme - don't change the original files!

Child themes are designed for you to customise a wordpress theme.

This means:
(1) If anything breaks you can easily disable files and work out which one is broken.
(2) If the Slidingdoor theme is updated you can keep all your custom changes.

To make a child theme:
1. In your wp-content/themes folder make a folder called 'slidingdoor-child'
2. Make a file in this folder called 'style.css' that has this in it:

Code: Select all
/*
Theme Name: Sliding Door Child
Theme URI:
Description: Child Theme for Sliding Door
Author: Your name!
Author URI:
Template: sliding-door
Version: 0.1
*/
 
@import url("../sliding-door/style.css");
@import url("../sliding-door/dark.css");
@import url("../sliding-door/light.css");
@import url("../sliding-door/imagemenu/imageMenu.css");

/* Place new css code below here */


3. In the wordpress admin go to appearance themes and enable the child theme, not the main theme.
4. Go for it. If you want to change a file, make a COPY of it from the main slidingdoor theme folder to this new child theme folder, and any files in this child theme folder will over-write the originals.

You can just ADD css to this style.css, you don't need to copy the whole original .css file. The css you add to this child theme file will overwrite the original css.
wayne
Site Admin
 
Posts: 656
Joined: Tue Apr 08, 2008 7:02 pm

Re: IMPORTANT: Use a Child Theme

Postby gbt » Thu Aug 09, 2012 1:39 am

Hi Wayne ,
First i'd like to thank you for this great theme and support forum.

I have followed your instructions on creating a child theme in order to perform the changes. I wanted to remove the categories info existed originally on the right side bar by deleting the following lines from the sidebar.php file

<li class="widget-container"> <h3 class="widget-title"><?php _e( 'Categories', 'slidingdoor' ); ?></h3> <ul> <?php

wp_list_categories(array('title_li' => ''));

?>

</ul> </li>

So i tried to copy sidebar.php to the child theme in file manager but it would only place it in /
public_html/wp-content/themes/ and not in the childe theme folder, i don't know why. I tried copying another file. same thing. so i've downloaded the file and then uploaded it again to the child theme file , edited it. worked great. Have i done anything wrong in that whole process.

Thanks,
gbt
gbt
I'm new here
 
Posts: 1
Joined: Thu Aug 09, 2012 1:23 am

Re: IMPORTANT: Use a Child Theme

Postby Andrew P » Tue Aug 28, 2012 2:48 am

Hi Wayne,

I'm using a child theme this time so that I can keep my edits where I can see them!
But I'm finding that the light/dark setting means that a lot of my css settings (background colours particularly) are being overwritten.
My only workaround has been to remove line 68
Code: Select all
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $cssurl; ?>">

from header.php
Andrew P
Legend!
 
Posts: 12
Joined: Mon Nov 29, 2010 7:44 am
Location: Hall, ACT, Australia


Return to Advanced - Customising the theme