Loading


Advertisement:

Author Topic: How to setup Child theme?  (Read 12580 times)

irvhyne

  • Newbie
  • *
  • Posts: 6
How to setup Child theme?
« on: August 05, 2014, 07:47:32 am »
Can anyone please help? What do you need to do to make a child theme?

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4690
Re: How to setup Child theme?
« Reply #1 on: August 05, 2014, 01:07:42 pm »

irvhyne

  • Newbie
  • *
  • Posts: 6
Re: How to setup Child theme?
« Reply #2 on: August 05, 2014, 05:42:45 pm »
Thank You

evilbetty

  • Newbie
  • *
  • Posts: 10
Re: How to setup Child theme?
« Reply #3 on: August 08, 2014, 09:38:27 am »
After creating a child theme folder and index page, how do you activate said child theme?
Is it supposed to show up in the admin? (because mine is not)

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4690
Re: How to setup Child theme?
« Reply #4 on: August 08, 2014, 10:10:46 am »
After creating a child theme folder and index page, how do you activate said child theme?
Is it supposed to show up in the admin? (because mine is not)

Is it in oc-content/themes folder?
does it have readable permissions ?

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1829
  • osclass.work
Re: How to setup Child theme?
« Reply #5 on: August 08, 2014, 12:01:51 pm »
If I understand it correctly, you do not need to enable anything in particular, files should be included automatically after main theme, and override them.

Here is the link that describes how this feature works in Wordpress, maybe the idea is borrowed from it and works the same way:
http://codex.wordpress.org/Child_Themes

Regards

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3644
  • osCanyon, the class of Osclass
Re: How to setup Child theme?
« Reply #6 on: August 08, 2014, 10:40:52 pm »
@dev101,

For the most part the child themes work a lot like how they do in WordPress. I am sure there are a few differences.

Basically what happens is if your child theme has say the main.php file in the folder then your child theme main.php file is loaded instead of the parents main.php file.

One thing to note is to override the css you have have a functions.php file to enqueue the css file of the child theme.

Jay

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 1829
  • osclass.work
Re: How to setup Child theme?
« Reply #7 on: August 08, 2014, 11:09:08 pm »
Thanks Jay for clarifying, very useful feature from you ;-)

Regards

evilbetty

  • Newbie
  • *
  • Posts: 10
Re: How to setup Child theme?
« Reply #8 on: August 10, 2014, 01:43:15 pm »
The folder is named "bender-child", and is in oc-content/themes. It has an index.php file in it with the necessary "Parent Theme: bender" line in it. Permissions are all set to 0755.

The reason I ask is because despite all of this, when I override a file in the parent theme, I can see no changes as expected  :-\

raess

  • Full Member
  • ***
  • Posts: 240
Re: How to setup Child theme?
« Reply #9 on: August 11, 2014, 10:52:26 pm »
I've done as described in http://doc.osclass.org/How_to_create_a_child_theme. But I cant get it to work.. :(

-> Added a folder in oc-content/themes/demo-child

In the demo-child folder i created a index.php with.

Code: [Select]
<?php
/*
Theme Name: demo theme child
Theme URI: http://demo-child.com
Description: Osclass demo theme child
Version: 1.0
Parent Theme: demo
*/

?>

To try it. I uploaded main.php to oc-content/themes/demo-child
And change some text. but canĀ“t see any changes. :(
Is it supposed to get up child-theme in the admin panel?

Does anyone know what i did wrong? :D

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3644
  • osCanyon, the class of Osclass
Re: How to setup Child theme?
« Reply #10 on: August 12, 2014, 01:23:31 am »
@raess,

is your parent themes folders name demo?

For an example to make a child theme for the bender theme you should have the

Parent Theme: bender as bender is the name of the folder for the bender theme.

Jay

raess

  • Full Member
  • ***
  • Posts: 240
Re: How to setup Child theme?
« Reply #11 on: August 12, 2014, 01:35:49 am »
Hey @jay  :)
Yes My Parent Theme is: demo
And i set it up like obove:) but cant See changes on the website.
Is the Child theme supossed to be activeted in admin control?

Thanks
/R

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3644
  • osCanyon, the class of Osclass
Re: How to setup Child theme?
« Reply #12 on: August 12, 2014, 02:30:46 am »
Yep the child them is supposed to be activated in appearances.

Jay

evilbetty

  • Newbie
  • *
  • Posts: 10
Re: How to setup Child theme?
« Reply #13 on: August 12, 2014, 07:53:10 am »
I'm beginning to think this is a bug! My child theme doesn't show up in "appearances".

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3644
  • osCanyon, the class of Osclass
Re: How to setup Child theme?
« Reply #14 on: August 12, 2014, 09:35:17 am »
Hi evilbetty,

Try checking the permissions of your child themes folder and the index.php file.

Jay