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