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: 727
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

Re: IMPORTANT: Use a Child Theme

Postby malik66 » Tue Jan 21, 2014 9:33 am

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.
malik66
I'm new here
 
Posts: 1
Joined: Tue Jan 21, 2014 9:31 am

Re: IMPORTANT: Use a Child Theme

Postby kikibelu » Thu May 22, 2014 7:35 pm

Hi wayne,

I used your theme up to 10 sliding doors for one site.

But, I don't make a child theme, just a copy with modified files. Never updated, my version make troubles with last version of WP
Thus, I make a child theme. I follow your post, all was nice until....

If I preview without changes, that's ok

But when i copy function.php in my slindingdoor-child folder, the preview is white, any button appear...

Can do this ? where is the mistake ?

thanks a lot !


sorry for my bad english, I m belgian
kikibelu
Legend!
 
Posts: 10
Joined: Fri Apr 06, 2012 2:56 pm

Re: IMPORTANT: Use a Child Theme

Postby Xander » Sat Feb 20, 2016 10:08 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.


Hi Wayne great post and thanks for the sliding door theme. I'm going to use it in soon on my new site. So by creating a child theme when we want to use it do we delete the main theme and replace it with the child theme? I'm not too familiar with WP.
A bottle of phenq helped me lose weight.
Xander
I'm new here
 
Posts: 1
Joined: Fri Feb 19, 2016 12:53 pm

Re: IMPORTANT: Use a Child Theme

Postby kimhud » Sat Sep 16, 2017 11:13 am

In my view, Child themes are designed for you to customise a wordpress theme, but i have got some error while updating the theme check this
kimhud
I'm new here
 
Posts: 1
Joined: Sat Sep 16, 2017 9:05 am
Location: USA

Re: IMPORTANT: Use a Child Theme

Postby julias » Sat Sep 16, 2017 1:04 pm

I also have the same problem when I updating child theme in WordPress. Have any solution?
julias
I'm new here
 
Posts: 1
Joined: Sat Sep 16, 2017 12:59 pm


Return to Advanced - Customising the theme