Advertisement:

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

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: How to setup Child theme?
« Reply #30 on: August 12, 2014, 04:32:01 pm »
Well, it was worth a try, I'd keep it that way anyway. Sorry, really at this time you know much more about Child themes than me. :D But with a brand new feature like this you never know until a developer takes a look at your problem. ???

Regards

raess

  • Full Member
  • ***
  • Posts: 240
Re: How to setup Child theme?
« Reply #31 on: August 12, 2014, 04:55:53 pm »
Child theme solved! Must go to the dentist now. makes an update later. :D

Cheers

tomshaft

  • Hero Member
  • *****
  • Posts: 862
  • Osshaft for Osclass - Add 650 posts to my total
Re: How to setup Child theme?
« Reply #32 on: August 12, 2014, 05:12:17 pm »
Child theme solved! Must go to the dentist now. makes an update later. :D

Cheers

Looking forward to your updated post as to how and what you did to solve this.

Tom

raess

  • Full Member
  • ***
  • Posts: 240
Re: How to setup Child theme?
« Reply #33 on: August 12, 2014, 06:48:58 pm »
How to setup child theme:
  • Create an folder in oc-content/themes/yourtheme_child (NOTE: will not work with dash -) with permission (755)
  • Name the folder yourtheme_child
  • In yourtheme_child folder create an index.php (NOTE: the files in this folder should have permission (644)
  • In the Index.php add for example: (change the yourtheme with your theme name.
    <?php

    /*
    Theme Name: yourtheme_child
    Description: Your theme child
    Version: 1.0
    Author: you
    Author URI: http://yousite.com
    Parent Theme: yourtheme
    */
    ?>
  • NOTE: Parent Theme: should be named after the theme you want to have a child of.
  • Copy (inc.functions.php) from oc-content/themes/yourtheme and add to oc-content/themes/yourtheme_child folder
  • Go to your admin dashboard -> appearance and activate the yourtheme_child
  • DONE.

For example if you want to EDIT main.php of your Parent theme. Copy (main.php) to oc-content/themes/yourtheme_child folder and edit it...


Enjoy! It works SuperB

/R
« Last Edit: August 12, 2014, 06:54:17 pm by raess »

tomshaft

  • Hero Member
  • *****
  • Posts: 862
  • Osshaft for Osclass - Add 650 posts to my total
Re: How to setup Child theme?
« Reply #34 on: August 12, 2014, 07:31:07 pm »
Seems we were all kind of close. Last part about main.php example I knew but could not seem to help you with the first part. I don't see what is different from our posts?
Looks like Teseo hit it on the head with his suggestion....
 
Suggest you make solved.
Thanks from all of us that WILL benefit from your experience.
Tom
« Last Edit: August 12, 2014, 07:41:28 pm by tomshaft »

raess

  • Full Member
  • ***
  • Posts: 240
Re: How to setup Child theme?
« Reply #35 on: August 12, 2014, 07:53:23 pm »
:)

The main different is:
Copy (inc.functions.php) from oc-content/themes/yourtheme and add to oc-content/themes/yourtheme_child folder

Thanks for the help guys! Have a nice day!

tomshaft

  • Hero Member
  • *****
  • Posts: 862
  • Osshaft for Osclass - Add 650 posts to my total
Re: How to setup Child theme?
« Reply #36 on: August 12, 2014, 08:01:34 pm »
Thanks. Guess I should had noticed THAT.... ;)
 
Great work on your part.
 
Tom

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: How to setup Child theme?
« Reply #37 on: August 12, 2014, 08:04:42 pm »
thank you for solving..will probably need this later!! bookmarking

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: How to setup Child theme?
« Reply #38 on: August 12, 2014, 08:07:57 pm »
Hi,

I couldn't remember any theme or plugin using a dash in its name. So I have done the test, renamed google_maps to google-maps and it won't show in the list of available plugins, same with a theme. Try changing all "kupatana-child" to "kupatana_child". ???

Regards
This is fixed for plugins, I guess same should be done for theme names
https://github.com/osclass/Osclass/pull/1335

Regards

raess

  • Full Member
  • ***
  • Posts: 240
Re: How to setup Child theme?
« Reply #39 on: August 12, 2014, 08:10:28 pm »
Thanks. Guess I should had noticed THAT.... ;)
 
Great work on your part.
 
Tom


Easy to miss. :) Can you Verify that this works with different theme?
And then Maybe someone can update the help docs. :)

/R

kalua

  • Newbie
  • *
  • Posts: 9
Re: How to setup Child theme?
« Reply #40 on: August 21, 2014, 03:23:00 am »
Do you mean ( functions.php  )? i dont find a inc.functions.php file....

:)

The main different is:
Copy (inc.functions.php) from oc-content/themes/yourtheme and add to oc-content/themes/yourtheme_child folder

Thanks for the help guys! Have a nice day!

raess

  • Full Member
  • ***
  • Posts: 240
Re: How to setup Child theme?
« Reply #41 on: August 21, 2014, 12:51:25 pm »
Do you mean ( functions.php  )? i dont find a inc.functions.php file....

:)

The main different is:
Copy (inc.functions.php) from oc-content/themes/yourtheme and add to oc-content/themes/yourtheme_child folder

Thanks for the help guys! Have a nice day!


Yes :)

kalua

  • Newbie
  • *
  • Posts: 9
Re: How to setup Child theme?
« Reply #42 on: August 21, 2014, 10:53:21 pm »
I am able to modify every file using child themes except footer.php
It doesnt change it at all.
I modified header.php, main.php , user-login.php , all working ok. But changes at footer.php does not showing at all.-
Tested on bender.

Not asking for solutions, just want to know  if
Is it me or someone else has this issue?
« Last Edit: August 21, 2014, 10:55:40 pm by kalua »

evilbetty

  • Newbie
  • *
  • Posts: 10
Re: How to setup Child theme?
« Reply #43 on: August 23, 2014, 07:20:59 am »
It's now showing and selected in appearances, thank you!
However, I am still not seeing my changes. When I copy and edit a file into the child theme folder, it still defaults to the parent folder :/
Where is the code that tells Osclass to look in the child theme and then look in the parent theme?
Does this need to be in the functions.php, or should the functions.php file be empty to begin with?
(if I copy functions.php directly to my child theme folder I get an error)
« Last Edit: August 23, 2014, 07:38:41 pm by evilbetty »

evilbetty

  • Newbie
  • *
  • Posts: 10
Re: How to setup Child theme?
« Reply #44 on: September 03, 2014, 09:10:09 am »
bump  :(
(edit: $20 to anyone that can help me solve this! via Paypal)
« Last Edit: September 03, 2014, 01:05:53 pm by evilbetty »