add filters to functions.php in child theme not working

  • sdubz

    #10414

    Having trouble adding filters to functions.php For example:

    <?php
    add_filter('widget_text', 'do_shortcode');
    ?>

    This is basic wordpress stuff. I’ve never seen it fail, and it works on sites with other templates. It fails on graphene. Perhpaps graphene isn’t loading functions.php from child themes? I’ve attempted adding functions.php to my graphene child theme as well as my graphene-neo-mobile child theme. I even found a support page that shows functions.php for neo must be in a folder named graphene-mobile-custom . So I put it there (i tend to name my child themes after the site, not the template). No luck. And no luck placing it in my graphene folder. A general plugin doesn’t work, either.

    I need to be able to do this.

    Thanks!

    Mod

    Kenneth John Odle

    #46083
    Quote:
    I even found a support page that shows functions.php for neo must be in a folder named graphene-mobile-custom .

    You can name it whatever you want, as long as you call the parent theme correctly.

    Quote:
    Perhpaps graphene isn’t loading functions.php from child themes?

    I have no problem adding functions to both Graphene and Graphene Neo child themes. Are you sure that your custom function is correct?

    Admin

    Syahir Hakim

    #46084

    For the functions from a child theme to be loaded, you need to actually activate the child theme. Otherwise they would not be loaded.

    For Graphene:

    1. Create the child theme.
    2. Add functions to the child theme’s functions.php file.
    3. Activate the child theme.

    For Graphene Mobile Neo:

    1. Create the child theme.
    2. Add functions to the child theme’s functions.php file.
    3. Go to WP Admin > Settings > Any Mobile theme. Select the child theme as the theme to be used for mobile devices.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.