• fortyfivecreative

    (@fortyfivecreative)


    Hi, it seems that if I add the shortcode to a page template outside the loop, the questions display but I cannot toggle the answers open. Any help would be much appreciated. Thanks…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter fortyfivecreative

    (@fortyfivecreative)

    Quick follow up to this. It seems that jquery.genesis-simple-faq.min.js is not being called unless [gs_faq] is placed in the main editor window. I could call the JS manually but this seems to be a bit messy. Can anyone please help with a fix? Thanks

    Plugin Contributor Nick C

    (@modernnerd)

    Hi, @fortyfivecreative.

    For now you would need to edit the plugin to load the dependencies even if shortcodes appear outside the main content.

    That’s currently controlled in the ‘load_dependencies’ method here.

    You could change this:

    // Load assets if in post content.
    if ( has_shortcode( $content, 'gs_faq' ) ) {
    	Genesis_Simple_FAQ()->assets->enqueue_scripts();
    }
    

    To this:

    
    Genesis_Simple_FAQ()->assets->enqueue_scripts();
    

    There’s an issue to look into this in a future plugin update, but I don’t have a timeline for an official fix just yet. https://github.com/studiopress/genesis-simple-faq/issues/34

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Toggle Not Working Outside Loop’ is closed to new replies.