Saturday, December 14, 2013

child theme in wordpress to avoid loosing revision after updating

I used coller wordpress theme but for some error after updating, I changed it to twenty twelve theme for my wordpress site.

Fishfig magento wordpress plugin is basically compatible with twenty twelve and coller, etc. When you use Tiga theme, sidebar will not be shown in your wordpress blog. I solved this problem for Tiga theme and I will explain in the other post.

I leave a following record not to forget what I did in installing Taga theme.

**. Make a child theme.
When you decide your theme, it is better to use chile theme because you will revise a little for your custom revision.
- Let's say that you installed tiga.
- copy them and make a child theme : tiga-child. (If your theme is twenty twelve, twenty twelve-child)
- In child theme directorty, create a file named style.css and add following

/*
 Theme Name:     Tiga Child
 Theme URI:      http://
 Description:    Tiga Child Theme
 Author:         You
 Author URI:     http://
 Template:      Tiga
 Version:        1.0.0
*/
@import url("../tiga/style.css");
/* =Theme customization starts here
-------------------------------------------------------------- */

 ** Template
When you create your own template under the directory (page template) of child theme, it will overwrite the same name in your original tiga theme.

** Function.php
After adding some script in functions.php of your child theme, it will not overwrite the original functions.php. It just add that function of child theme to the original theme tiga.

** Including files in your child theme
When you make some file.php in your child theme, you need to include following script [get_stylesheet_directory()] in your style.css of child theme as follows:

 require_once( get_stylesheet_directory() . '/file.php' );

Make sure use the correct patch.

Using the child theme is very useful to avoid loosing revised them after updating your theme.

* give a authorization and activation: You have to set an authorization in your child theme

- chmod -R 755 (or 707) your child theme name
- Then, you will see your theme in dashboard>Appearance>Theme
- Activate your child theme.

Thank you.

Reference: codex.wordpress.org/Child_Themes

No comments:

Post a Comment