Reply 189030 to: Disable Magnific Popup

Avatar: Royalty
Royalty
Participant
March 22, 2018 at 16:46

On post pages. I have commented out the following code in etheme.js and that worked, but I dont know if thats a good way or if there is a better solution I could implement in my childtheme:

    // **********************************************************************//
    // ! Images lightbox
    // **********************************************************************//
    $("a[rel^='lightboxGall']").magnificPopup({
        type:'image',
        gallery:{
            enabled:true
        }
    });

    $('.images-popups-gallery').each(function() { // the containers for all your galleries
        $(this).magnificPopup({
            delegate: "a[data-rel^='gallery']", // the selector for gallery item
            type: 'image',
            gallery: {
              enabled:true
            }
        });
    });

    $("a[rel='lightbox'], a[rel='pphoto']").magnificPopup({
        type:'image',
        closeBtnInside: true,
        preloader: false,
        midClick: true,
        removalDelay: 300,
        callbacks: {
            beforeOpen: function() {
                this.st.mainClass = 'my-mfp-slide-bottom effect-delay2';
            }
        }
    });
Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.