July 11, 2013 at 5:28 pm #26082
I’m in the process of customizing the replete theme in some way and have decided to go for a child theme. Unfortunately it seems that modifications I put into my child theme’s css doesn’t take place at all? Can it be that replete doesn’t support child themes?
Thanks in advanceJuly 12, 2013 at 1:08 am #129243
Yes, the theme does support child themes. Just make sure the css you are adding is getting added to the style.css file and that the child theme is set up correctly so that the style.css for the child theme is loaded in.
If you have a link to your site with the child theme active and some css added in maybe we can spot whats causing the disconnect.
DevinJuly 12, 2013 at 9:16 pm #129244
thank you very much for your response.
Basically I’ve created a child-theme, which also shows perfectly up in the dashboard, it is active and even the theme options has renamed to “Thinkspot Theme Options”, but for any reason the styles I put into this stylesheet doesn’t apply in any way on the site. I even can’t see it loading in the source code of the frontend. However the functions.php gets loaded quite nicely and executes the code in there. So I’m really not sure what might can happen that the child theme shows up, but doesn’t get loaded.
I’ve deactivated all plugins just to be sure that none of them interrupts the process in any way – still with no difference at all.
The URL is: http://thinkparts.de
Thanks for having a look into this.
All the bestJuly 12, 2013 at 9:37 pm #129245
I’ve made some further tests. I’ve applied the child theme to use twentyten as the parent theme. Simply changed templatename from replete to twentyten – my css got immediately applied (from the child theme’s style.css) and everything was fine. I only needed to @import the parent’s style.css into to get the base styles from twentyten. Changed the templatename back to replete and my css in the child theme’s style.css doesn’t had any effect at all again.
Sorry to say that but this must be something related to replete alone.
All the bestJuly 13, 2013 at 2:19 am #129246
I don’t see the child theme active on the live site so there isn’t any way for me to really debug whats going on. My guess is the style.css is loading in before the parent them but without seeing it live I can’t really be sure.July 13, 2013 at 8:47 am #129247
Well, sorry, you’re right. The Child Theme wasn’t active at time where you visited it. Sorry for that. I’ve re-activated it again and will leave it until you posted your response.
Sorry for the troubles.
All the best.July 15, 2013 at 6:01 am #129248
Edit functions.php, find this code:
wp_register_style( 'avia-custom',get_template_directory_uri()."/css/custom.css", array(), '1', 'screen' );
Add this code below:
wp_register_style( 'avia-child',"/wp-content/themes/XXXX</style.css", array(), '1', 'screen' );
Replace XXXX with the name of your child theme folder.
Again, find this code:
Add this code below:
The style.css on your child theme should properly work.
IsmaelJuly 15, 2013 at 10:31 am #129249
thank you very much for that. Your solution works pretty fine. But still have some questions tough:
1. It doesn’t seem to me like a proper solution, and I guess it gets overwritten again as soon as the theme gets updated, right?
2. Why doesn’t it work the default way like it works with the majority of other themes? There is actually no need to load the child theme’s style.css via enqueue_style() – it usually works out of the box. Why doesn’t it work with replete and I need to explicity load the child theme’s style.css from the parent theme?
Thank you very much in advance for your answer and for clearing this up.
All the best,July 15, 2013 at 2:03 pm #129250
You can either do the above or in the main theme themes functions.php change:
wp_register_style( 'avia-style', get_template_directory_uri()."/style.css", array(), '1', 'all' );
wp_register_style( 'avia-style', get_stylesheet_directory_uri()."/style.css", array(), '1', 'all' );
I had the change done locally and on my live test but it looks like it wasn’t included in the last update. So if you make the change to the theme now it will be there when you update the parent theme anyway.July 15, 2013 at 2:54 pm #129251
well ok, that seems for me like a much better and more robust solution, altough I still believe there is actually no specific need to explicity load the child theme’s style.css from the parent theme’s functions file. But anyway – it works, it will be added to the next update – I’m happy, Client happy, everybody happy :)
Last but not least I would like to add a request if it will be possible for you to implement this fix in a way that the child-theme’s style.css gets loaded after all parent theme css files gets loaded but before the theme options quick css – so we’re not always forced to give our css declarations more weight with !important statements, to get applied.
Thank you very muchJuly 16, 2013 at 7:58 am #129252
Just place the code we provided:
below this one:
$safe_name = avia_backend_safe_string($avia->base_data['prefix']);
if( get_option('avia_stylesheet_exists'.$safe_name) == 'true' )
$avia_upload_dir = wp_upload_dir();
$avia_dyn_stylesheet_url = $avia_upload_dir['baseurl'] . '/dynamic_avia/'.$safe_name.'.css';
wp_register_style( 'avia-dynamic', $avia_dyn_stylesheet_url, array(), '1', 'screen' );
The topic ‘Child Theme not supported?’ is closed to new replies.