-
Notifications
You must be signed in to change notification settings - Fork 23
Child Themes
Since version 1.6 you can fully use the Child Themes feature.
The implementation of the Child Themes support is strictly connected with two functions:
- gavern_file_uri - returns the URI to the specific file relative to the root of the theme directory
- gavern_file_path - returns the absolute path to the specifi file relative to the root of the theme directory
Both functions accepts the false as an argument - then these functions returns the URI/path to the specific theme directory.
IMPORTANT! Please remember to don't use the slash at the start of the path to file.
In example:
gavern_file_uri('images/abc.png');
will return: http://yourdomain.com/wp-content/themes/MeetGavernWP/images/abc.png
and using the false argument:
gavern_file_uri(false);
will return: http://yourdomain.com/wp-content/themes/MeetGavernWP/
So now you can override every file in your Child Theme. Please remember about some specific dependicies.
I.e. you can copy the template.css file and change it, but then you will have to also import to your Child Theme the images directory, because the theme will use the CSS from the Child Theme's directory so the CSS file will link to the images directory in the Child Theme's directory.