I want to modify which pages have the shopping cart in the header, which I believe requires modification of the functions.php file. Rather than hacking the theme, which would have to be re-hacked every time Kriesi releases an update, is there a way to use a second, custom functions.php to change the behavior?
Does Kriesi's Avia framework allow a custom functions.php?
4 posts from 2 voices-
Posted 1 year ago #
-
Hey! I guess the easiest way would be to simply create a child theme with an additional functions.php
that way you can update the default theme and add custom functions to your own child themes functions.php file
The wordpress documentation describes pretty good what you need to do this so Ill just drop you the link ;)
http://codex.wordpress.org/Child_Themes
Cheers
KriesiPosted 1 year ago # -
Thanks for the suggestion. I think that's the way to go. However, the parent theme's functions need to allow a child theme to replace them. Is that something you would consider building into the next release?
From the WordPress documentation:
TIP FOR THEME DEVELOPERS. The fact that a child theme’s functions.php is loaded first means that you can make the user functions of your theme pluggable —that is, replaceable by a child theme— by declaring them conditionally. E.g.:
if (!function_exists('theme_special_nav')) { function theme_special_nav() { // Do something. } }In that way, a child theme can replace a PHP function of the parent by simply declaring it again.
Posted 1 year ago # -
Hey!
will build it into the next release ;)
Best regards,
KriesiPosted 1 year ago #
Reply
You must log in to post.














