Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1311960

    Not sure what is going on here but I am dequeueing scripts and enfold is just injecting them back into the layout anyway. I’ve tried everything from 9999 to 0 to 5 priority and nothing seems to work. On localhost, it works. On, production, enfold just ignores it.

    I’ve verified the dequeue actually runs by dumping scripts to the html using <!–> and i can say for sure things like isotope are not in there. But in the footer there it is: isotope.

    
    <script type="text/javascript" src="/wp-content/themes/enfold_2021/config-templatebuilder/avia-shortcodes/portfolio/isotope.js?ver=5.6.4" id="avia-module-isotope-js"></script>
    
    
    add_action('wp_print_scripts', 'avia_dequeue_unused_js', 100);
    function avia_dequeue_unused_js() {
      wp_dequeue_script('avia-module-portfolio');
      wp_dequeue_script('avia-module-postslider');
      wp_dequeue_script('avia-module-slideshow');
      wp_dequeue_script('avia-module-slideshow-video');
      wp_dequeue_script('avia-module-isotope');
    }
    

    EDIT: nevermind

    I think adding masonry to this forced it off the stack. Not sure why localhost was working but here we are:

    
      wp_dequeue_script('avia-module-masonry');
      wp_dequeue_script('avia-module-portfolio');
      wp_dequeue_script('avia-module-postslider');
      wp_dequeue_script('avia-module-slideshow');
      wp_dequeue_script('avia-module-slideshow-video');
      wp_dequeue_script('avia-module-isotope');
    
    • This topic was modified 4 years, 7 months ago by jlatmyoutdesk.
    #1312275

    Hey jlatmyoutdesk,

    Thanks for the update. So everything is working as it should now then?

    Best regards,
    Rikard

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.