• We’ve been developing a site for the last 6 months or so, and have been using Fancybox 2 since the beginning. Your megamenu plugin is great and exactly what we were looking for, except it uses Fancybox 1.3.4 – which causes most of the Fancybox calls on our site to break.

    I’ve been attempting to either dequeue Fancybox 1.3.4 or place my Fancybox 2 later in the script queue, but neither seem to be working.

    function bs_dequeue_scripts() {
    	wp_deregister_style( 'wr-pb-jquery-fancybox' );
    	wp_deregister_style( 'wr-mm-jqueryfancybox' );
    
    	wp_deregister_script( 'wr-pb-jquery-fancybox' );
    	wp_deregister_script( 'wr-mm-jqueryfancybox' );
    }
    
    add_action( 'wp_print_scripts', 'bs_dequeue_scripts', 100 );

    Using this code, when I do a var_dump($wp_scripts);, Fancybox 1.3.4 isn’t found on the list – yet I still see it being included in the footer, which leads me to believe that it isn’t being included by a normal script enqueue. I also can’t seem to place my script below yours, no matter what priority I assign to it.

    Please advise? I’d love to continue using your plugin, but I won’t be able to if I can’t dequeue your Fancybox.

    https://www.ads-software.com/plugins/wr-megamenu/

  • The topic ‘Script conflict – Fancybox 1.3.4 not dequeueing properly?’ is closed to new replies.