Is there a way (i.e. a class I could add) to disable the lightbox on a specific page or within a div?
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
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?
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
Thanks, Yigit.