Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #365945

    Hello!

    I am using the plugin Essential Grid and have the problem with the lightbox/pretty photo. I still want to use pretty photo globally, so for me its not a solution to just switch it off in the theme settings.

    The Support of Essential Grid provided me the following different codes to switch off the light-box when using FancyBox:

    // FancyBox: when the theme adds the fancybox class
    jQuery(‘.esg-grid .fancybox’).off(‘click.fb’);

    // FancyBox: when the theme just connects the hyperlink, without adding a fancybox class
    jQuery(‘.esgbox’).off(‘click.fb’);

    // ColorBox
    jQuery(‘.esgbox’).removeClass(‘cboxElement’);

    Can you please help me which code I would have to use for pretty photo?

    Thank you very much,
    Kilian

    #366231

    Hey kimoribj!

    To make sure I understand right. Your using a plugin which has some kind of lightbox script and your wanting to disable it and use Enfold’s magnific popup?

    The plugin authors gave you that code to turn off the lightbox for their plugin correct?

    I suppose you could try adding it to the footer. Add this to the bottom of your /enfold/functions.php file.

    add_action( 'wp_footer', 'enfold_customization_customscript' );
    function enfold_customization_customscript(){
    ?>
    <script type = "text/javascript">
    jQuery(document).ready(function(){
    // FancyBox: when the theme adds the fancybox class
    jQuery(‘.esg-grid .fancybox’).off(‘click.fb’);
    
    // FancyBox: when the theme just connects the hyperlink, without adding a fancybox class
    jQuery(‘.esgbox’).off(‘click.fb’);
    
    // ColorBox
    jQuery(‘.esgbox’).removeClass(‘cboxElement’);
    });
    </script>
    <?php
    }

    If that’s not working then send us a link to your page and we’ll take a look.

    Regards,
    Elliott

    #367183

    Thank you!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘disable pretty photo’ is closed to new replies.