• Resolved PPNSteve

    (@ppnsteve)


    We have been using a lot of the builtin embeded wp galleries lately and noticed that easy fancybox is loading the (clicked?) image behind the WP based gallery popup as well. We want to disable fancybox on any default gallery image (group) and just use thew default WP behavior.

    how can this be done?

    Easy FancyBox Version 1.8.9
    WP Version 4.9.8
    Example page with a WP Gallery embed: https://www.a4at.com/2018/10/26/mars-chaos-menace-will-arrive-in-november-on-main-platforms/
    Perhaps a class detection logic is needed? (i.e. class=”tiled-gallery type-circle” on example link)

    thanks

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, the light box you are seeing there is coming from Jetpack module called Carousel. It’s not built into WordPress. If you prefer that light box, my advise is to disable FancyBox since running multiple light box scripts together (even when disabled for these galleries) your site load times get longer than they need to be.

    Thread Starter PPNSteve

    (@ppnsteve)

    OK then, so again, how would one disable fancy box on embedded galleries only?
    we need it for single images as that carousel doesn’t work on single images.

    Does the Vantage theme have an option to add custom javascript? If not, you’d have to create either a plugin or a child theme to add the following javascript snippet:

    
    jQuery( document ).ready( function($) {
        $('.tiled-gallery a').addClass('nofancybox');
    } );
    

    Note that this would only target Tiled Galleries.

    Thread Starter PPNSteve

    (@ppnsteve)

    OK might be able to do that..
    where would that need to be placed?

    You could add that in the header or (better) in the footer.php but place it before the <?php wp_footer(); ?> call.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Disable fancybox when using WP galleries’ is closed to new replies.