• Resolved rbgiddings

    (@rbgiddings)


    I’m wondering if there are any known issues with this plugin and the Genesis framework, specifically when using a Genesis child theme?

    I’m trying to set up a new widget, but when I try to activate the code I get this error: “Call to undefined function genesis_register_sidebar()”. I’m confirmed that the child theme I’m using (Atmosphere Pro) has this exact code in the theme’s functions.php file.

    I’m wondering if the code snippet is trying to run BEFORE the Genesis parent framework has been initiated or something?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Yes, this is correct. Unlike plugins, snippets are executed before themes, so none of the Genesis functions have been defined yet.

    Fortunately, the solution for this is pretty simple: instead of directly calling the Genesis functions, wrap them in an action hook:

    add_action( 'init', function () {
    
        // call functions such as genesis_register_sidebar() in here
    
    } );
    Thread Starter rbgiddings

    (@rbgiddings)

    This worked great! Thanks for the quick and thorough response.

    Plugin Author Shea Bunge

    (@bungeshea)

    Glad to hear that it’s working!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Call to undefined function – Genesis child theme?’ is closed to new replies.