Tagged: enfold, modal lightbox, single post
-
AuthorPosts
-
January 30, 2017 at 6:07 am #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!
ErikJanuary 30, 2017 at 6:19 am #740073Hello –
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!
ErikFebruary 2, 2017 at 5:03 pm #741906Hi 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,
YigitAugust 2, 2017 at 5:37 pm #833573Did you ever figure this out? I am trying to achieve a similar feature. I need to disable modal lightbox on a single page.
Thanks!
August 2, 2017 at 8:23 pm #833613Hi,
@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 -
AuthorPosts
- You must be logged in to reply to this topic.