Tagged: modal lightbox, Single Page
Hello,
I found a few threads that are related but none has solved my problem. I am trying to remove the modal lightbox on a single page that has a plugin which uses its own lightbox. Basically two light boxes appear, but I only need one. The page I’m referring to is below.
Here is the code I am using.
In my child avia.js I changes a line to:
exclude : '.page-id-14154 .noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',
then I added this to my child theme functions.php
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 );
It is still not working. Could you please tell me where my error is?
Thanks
I referred to an earlier post but it still doesn’t seem to be working. I’ve tried adding a class and using the page id. Here is the code I currently have added to the avia.js in my child theme.
exclude : '.postid-14154, .content-timeline, .noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',
Hi,
Sorry for the late reply!
Please change the code to following one
exclude : '.page-id-14154, .page-id-14154 a, .noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',
Best regards,
Yigit
An easier, no need for file changes, way (for me) was:
On the page with the plugin shortcode add a div
<div class="noLightbox noLightbox a fakeLightbox lightbox-added">
[shortcode from plugin]
</div>