Tagged: modal lightbox, Single Page
-
AuthorPosts
-
August 2, 2017 at 6:15 pm #833583
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
August 2, 2017 at 9:06 pm #833625I 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"]',August 7, 2017 at 1:39 pm #835360Hi,
Sorry for the late reply!
Please change the code to following oneexclude : '.page-id-14154, .page-id-14154 a, .noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',Best regards,
YigitMarch 12, 2018 at 11:31 am #925449An 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>March 12, 2018 at 2:00 pm #925512 -
AuthorPosts
- The topic ‘Disable modal lightbox on single page’ is closed to new replies.
