Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9997

    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?

    #66529

    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

    Kriesi

    #66530

    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.

    #66531

    Hey!

    will build it into the next release ;)

    Best regards,

    Kriesi

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Does Kriesi's Avia framework allow a custom functions.php?’ is closed to new replies.