Advertisement:

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

axs

  • Newbie
  • *
  • Posts: 18
Re: How to setup Child theme?
« Reply #45 on: September 14, 2014, 03:16:12 pm »
bump  :(
(edit: $20 to anyone that can help me solve this! via Paypal)

Check the attachment. Install it. Bender theme should be there.

Theme should be used with bender latest version i.e. 2.0.1 and Osclass latest version 3.4.1

« Last Edit: September 14, 2014, 03:30:07 pm by axs »

axs

  • Newbie
  • *
  • Posts: 18
Re: How to setup Child theme?
« Reply #46 on: September 14, 2014, 03:43:59 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?

You are right,

even common/head.php can not be used in child theme.

css/main.css file also not useable from child theme. If put in child theme no style applied from there. All styles come from parent theme css file.

css/ajax-uploader.css file should be in child theme to apply css on uploader.


« Last Edit: September 14, 2014, 03:48:11 pm by axs »

evilbetty

  • Newbie
  • *
  • Posts: 10
Re: How to setup Child theme?
« Reply #47 on: September 20, 2014, 07:53:37 am »
footer.php was confusing me because it's got the same HTML in it as header.php but does not reflect what's actually in the footer
And thank you axs, i'm not sure what you did differently but it's working now! I sent you a PM.

evilbetty

  • Newbie
  • *
  • Posts: 10
Re: How to setup Child theme?
« Reply #48 on: September 20, 2014, 01:16:57 pm »
axs, in order to override the css, you must enqueue it

put this line in your child theme's functions.php file...

Code: [Select]
osc_enqueue_style('main', 'oc-content/themes/benderchildtheme/css/main.css');

pare

  • Full Member
  • ***
  • Posts: 110
Re: How to setup Child theme?
« Reply #49 on: February 15, 2015, 06:23:39 am »
Hi,

hope anybody can help me.

I like to crate an child theme. If I use the infos from this thrad, I get a working child theme. But, if i copy the functions.php to the child folder, the page dosn't load anymore, only white page. If i delete the functions.php the child theme is loading fine with one problem, the language files of the parent theme doesn't work. Any Idea?

Thanks and regards
pare

evilbetty

  • Newbie
  • *
  • Posts: 10
Re: How to setup Child theme?
« Reply #50 on: March 04, 2015, 10:35:04 am »
You should create a blank PHP file in the root folder of your child theme called "functions.php".
Only use this file to create new or admended functions. Do not copy all of the functions from your parent theme.
In order to activate my child theme CSS, this is what my functions.php file looks like...
Code: [Select]
<?php
osc_enqueue_style
('main''oc-content/themes/liberty_child/css/style.css');
?>

pare

  • Full Member
  • ***
  • Posts: 110
Re: How to setup Child theme?
« Reply #51 on: March 07, 2015, 01:42:05 pm »
hi evilbetty,

thanks for your help, that works good.

But do you have an info, how i can get access to the langueage files? within the parent theme the language shows me correct, but within the child theme, it shows me only the english version.

thanks and regards,
pare

commandrea

  • Newbie
  • *
  • Posts: 3
Re: How to setup Child theme?
« Reply #52 on: April 09, 2015, 12:15:35 am »
If you're having problems getting your child theme's to override the parent theme, modify the child's main.php file:

USE THIS: <?php include 'footer.php'; ?> 

Instead of this: <?php osc_current_web_theme_path('footer.php') ; ?>

deyan4

  • Newbie
  • *
  • Posts: 28
Re: How to setup Child theme?
« Reply #53 on: September 20, 2016, 11:07:14 am »
Hello,

I'm having problems on embedding the child theme css.

My functions.php looks like that:

Code: [Select]
<?
function load_scripts() {
     osc_enqueue_style('style', osc_base_url() . 'oc-content/themes/gliderchild/css/style.css');
 }
?>

Do I have to add:

Code: [Select]
osc_add_hook('init', 'load_scripts');

in the child index.php file and should it be in the php tags?

Thank you!