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

    Is there a way (i.e. a class I could add) to disable the lightbox on a specific page or within a div?

    #425407

    Hi beedle!

    Open up /enfold/js/avia.js and around line 895 you should see this.

    exclude			:	'.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added',
    

    You can add a class or an ID of the div you want to exclude like so.

    exclude			:	'.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, .yourClass a, #yourID a',
    

    Regards,
    Elliott

    #425519

    Thanks so much, Elliott. That’s perfect. Is there any way to move that to a child-theme so it doesn’t get overwritten on update? Couldn’t I just create a div around the whole page and add the “noLightbox” class since the .noLightbox a is already there?

    #425532

    Hey!

    Please copy your modified avia.js file to your child theme inside JS folder and then add following code to Functions.php file of your 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 );

    Regards,
    Yigit

    #425534

    Thanks, Yigit.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Disable lightbox on one page or within div’ is closed to new replies.