Child Theme support MeetGavern 1.6

Feel free to talk about everything related to our Wordpress Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sun Feb 24, 2013 6:43 pm
Hi, I know support for the free theme is on Github, but I was only testing the child theme support of v1.6 that will be in all themes. Anyway, I can't get it to work. I tried different things, but in the end was testing with changing the font-size of H1. With me it doesn't work in child theme style.css, not even in override.css of the main theme, only finally when I changed it in template.css it happened. For the rest: zero.
User avatar
Junior Boarder

GK User
Sun Feb 24, 2013 8:24 pm
Hi,

The style.css file exists only for the WordPress needs - it isn't loaded in the theme. The override.css file should be earlier enabled in the advanced theme settings (it is defaultly disabled to avoid unnecessary http request) - in general you can override in the Meet GavernWP theme all files which exist in the original theme - I've tested it both for the CSS files and PHP files, and it was working correctly in Meet GavernWP 1.6.
User avatar
Administrator

GK User
Sun Feb 24, 2013 11:07 pm
I'm not sure if I understand you correctly, Tomasz. I'm used to it that the child theme style.css overrides the css settings from the main theme. How does it work then for Gavern? Do you mean that for instance if I want to override a ccs setting from template.css I should make another template.css within the child theme directory, with the overriding setting?
User avatar
Junior Boarder

GK User
Sun Feb 24, 2013 11:16 pm
You should copy the css/template.css file to your child theme and then modify it - then the css/template.css file from the original theme will be overrided with the one from the child theme - it works also for any other CSS/JS/PHP files in the theme. Please remember that if you copy a CSS file with relative references to the images, you should copy also these images to the child theme.

In other themes which you have used probably the style.css contained the CSS code or @import rules, so you have been able to override the theme using this file - as I wrote earlier - the style.css file is not really used in our themes - it is used only for WordPress theme manager to detect the theme properly.
User avatar
Administrator

GK User
Sun Feb 24, 2013 11:24 pm
But I need to use a complete copy of the file I understand? I'm curious why you choose for this option, cause I do not see the advantages then for the use of child themes that much.

I have indeed to check every file I use for url's and with every update of the theme I have to check every file I use in the child theme for changes and then manually redo everything. While I'm typing and realizing this it really puzzles me what the benefits are for this approach.
User avatar
Junior Boarder

GK User
Sun Feb 24, 2013 11:29 pm
In your case solution is very simple: you have to enable the override.css file, create the css/override.css file in your Child Theme and that's all - you will achieve the same effect as using the style.css file for adding own CSS rules (no risk that after update you will loose your changes).

The Child Theme mechanism is used to OVERRIDE existing theme files, that's why the described mechanism of the overriding template.css file is proper and normal - if you don't want to override the whole CSS files, then you have to use the override.css file.
User avatar
Administrator

GK User
Sun Feb 24, 2013 11:34 pm
I understand. So for the normal css customizations this works comparably as working with style.css. Tip: really explain this well for your Wordpress users, cause for them it's quite different.

Question: I sometimes also put new functions in a function.php. Is there also a way to just make it incremental to the original one in the main theme?
User avatar
Junior Boarder

GK User
Sun Feb 24, 2013 11:45 pm
It wasn't possible with php files, but I've added this change: https://github.com/GavickPro/Meet-Gaver ... 594b0bc54e

now you can create in your child theme file gavern/user.functions.php and put there all additional functions without worrying about future changes in the theme files :)
User avatar
Administrator

GK User
Sun Feb 24, 2013 11:52 pm
That's quick action from you. It's appreciated. I don't want to make things difficult for you, but I'm glad I tested this today, because it would be more effort to change it when it is implemented already in all the themes and customers start to ask about it. I noted some points still today, but I think we'll save it for next time :D

Thanks and till next time, Sjef.
User avatar
Junior Boarder


cron