• Resolved joelmelon

    (@joelmelon)


    Thanks for this great plugin! I use it in various places in my theme and it works perfectly. Now I’m trying to render a GutSlider block with the render_block() function. But it looks like the dependencies are not loaded this way, so all slides of the slider appear one below the other. Is there a hook or function I can use to include the frontend scripts as soon as I detect a GutSlider block in the render_block() function?

    Thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author Binsaifullah

    (@binsaifullah)

    Hi,

    thanks for using GutSlider. Right now, no custom hooks are available only for GutSlider, but you can use render_block_(block-name) filter hook to modify any specific block. For example, if you want to modify the fixed content slider, you can write the hook like this:-

    add_filter(‘render_block_gutsliders/content-slider’, function($block_content, $block){
    // write your codes
    });

    to manage assets, you can deregister any specific script and enqueue again as per your need. To do that, you can use wp_deregister_script(‘script-handle’)

    If you explore the doc in www.remarpro.com, you will find more information.

    thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Load Frontend Assets Hook’ is closed to new replies.