• Great plugin in general, but does not open at the frontend (not reaction on click) when working with hooked content, and does not root thru changes in icons (open, close) in that case. I am using Blocksy Pro, and the accordion is part of a block element (content block) to be hooked into a WooCommerce page. A hook feature is very common for premium and extended themes. The reason for this issue is probably your latest change, loading js only on pages where the accordion is placed at. In my case I can recognize, that your plugin js files are not loaded, where the accordion is hooked at.

    Another question I have: your accordion is loading jquery migrate in addition to jquery, is that really necessary?

    • This topic was modified 1 year, 11 months ago by vallered.
    • This topic was modified 1 year, 11 months ago by vallered.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Binsaifullah

    (@binsaifullah)

    Hi,

    thanks for letting me know the issue. The accordion js file is not loading due to conditional script loading. no worries I will remove the condition and release an update today. Our plugin’s script has a dependency on jquery, that’s why jquery migrate loads automatically by WordPress.

    Thread Starter vallered

    (@vallered)

    Hi,

    solved that way. My Theme Authors also provided a solution, that might be more specific, as it only runs your JS on Post ID with your Block, it is that way:

    add_action(‘blocksy:pro:content-blocks:pre-output’, function ($post_id) { if (has_block(‘esab/accordion’, $post_id)) { wp_enqueue_script( ‘esab-accordion-js’, ESAB_LIB_URL . ‘js/accordion.js’, array( ‘jquery’ ), ESAB_VERSION, true ); } });

    To avoid the heavy Jquery is loaded everywhere, it might be good to test it with your previous version, or the another way would be if you can name me a filter I can use to load your assets specificly

    • This reply was modified 1 year, 10 months ago by vallered.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Does not work for hooked content’ is closed to new replies.