Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #740069

    Hello –
    I am using the Envira Gallery plugin and followed the instructions from this thread: https://kriesi.at/support/topic/how-do-i-disable-wordpressenfold-lightbox-but-retain-plugins-lightbox-effect/. I have the Lightbox Modal enabled in Enfold Settings however want to disable it only on Posts.

    I made the following changes to the /js/avia.js file: (child theme)
    Orig:
    exclude : '.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',
    New:
    exclude : '.single-post a, .single-post, .noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',

    I added the following to the end of my functions.php file: (child theme)

    function wp_change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_print_scripts', 'wp_change_aviajs', 100 );

    When these are changed, the Envira images only appear when you hover over them and the lightbox effect is broken.
    Example post link in private content section.

    Thanks for your help!
    Erik

    #740073

    Hello –
    I ended up having to remove the functions.php changes completely. I didn’t notice it earlier but it broke image loading across the site.
    If you have any ideas on how to disable the Lightbox Modal on only posts – please let me know.
    Thank you!
    Erik

    #741906

    Hi Erik,

    Have you figured it out already?
    They way you previously applied the changes seem correct and should not break any images. But now when i check your site, i can see only Envira’s lightbox and not theme’s built in one :)

    Best regards,
    Yigit

    #833573

    Did you ever figure this out? I am trying to achieve a similar feature. I need to disable modal lightbox on a single page.

    Thanks!

    #833613

    Hi,


    @redeggmarketing
    Please refer to this post – https://kriesi.at/support/topic/disable-lightbox-on-many-pages-allow-for-certain/#post-587737 and if you need further assistance, please start a new thread under Enfold sub forum :)

    Best regards,
    Yigit

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