-
AuthorPosts
-
January 25, 2018 at 12:24 pm #902783
Hi Moderators,
I already found this topic: https://kriesi.at/support/topic/how-to-disable-modal-lightbox-only-on-one-page/
and tried to find the piece of code in the JS file, (Avia.js) but the whole code isn’t there. Tried to look for ‘exclude’ and it gives 0 results.
Im sure im in the right file: Enfold/JS/Avia.JSI use the Enfold 2017 theme. Maybe it is located some where else? Or its named differently?
link to website in private contentJanuary 25, 2018 at 12:33 pm #902792Hey KingFilly,
Which image do you need to remove the lightbox on? Can you please send a screenshot?
Best regards,
Jordan ShannonJanuary 25, 2018 at 12:45 pm #902807Hi Jordan,
It’s not 1 image… I’m using a plugin called: Custom Facebook Feed pro. It has his own lightbox which i would like to use for the blog page.
The specific page url is in the private section. we are also using a woocommerce webshop where we need the lightbox tool, so i can’t just disable it for the whole website. (An Enfold settings)I tried to find this code to change:
exclude : ‘.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*=”dropbox.com”]’,so i can add the page id, but this code is not in the JS file as mentioned.
Maybe it has something to do with the fact im using Enfold 2017?- This reply was modified 6 years, 10 months ago by KingFilly.
January 25, 2018 at 1:18 pm #902831Hi,
I see, thanks for clearing the information up. Please try adding the following to click css:
.page-id-89 .cff-lightbox-link, .page-id-89 .image-overlay-inside{ pointer-events:none!important; }
Best regards,
Jordan ShannonJanuary 25, 2018 at 1:36 pm #902837hi jordan,
I already tried this, but the problem with this is it disables all lightboxes, also the one of the plugin. I added your code in the Custom CSS.
you can see for yourselve on the blog page what it does.Seem like this thread: https://kriesi.at/support/topic/how-to-disable-modal-lightbox-only-on-one-page/
is the only way to solve it.What is the reason i can’t find the piece of code in the avia.js file?
- This reply was modified 6 years, 10 months ago by KingFilly.
January 25, 2018 at 6:44 pm #902958Hi,
Apologies, It should have only effected the lightboxes on the page link you sent over, did this not occur.
Best regards,
Jordan ShannonJanuary 25, 2018 at 7:47 pm #903000I don’t understand what your saying Jordan.
It is the right page-id, so that’s not it. (page-id-89
This is the page where i want to disable Enfolds Lightbox.
The code you provide avoids any lightbox, also the lightbox of the custom facebook feed.
the link of the page is in the private content.So yes the code you gave effects the lightboxes, bot also blocks other plugin’s lightboxes. In this case the custom facebook feed.
The thread link shows another solution. Can you tell me who to find that piece of code they are talking about in the Avia.js file?January 29, 2018 at 11:56 am #904200Hi,
I loaded the page with clear cache and I cant see any lightbox at all.
Has it been fixed?Best regards,
BasilisJanuary 30, 2018 at 10:50 am #904702Hi Basilis,
strangely enough the option in Enfold Setting ‘ Lightbox Modal Screen’ is selected.
if you go to the webshop and select a product the lightbox works.
somehow the lightbox on the blog page doesn’t work.
(Photo’s in sidebar on Blog page is from the Facebook feed)Does the plugin overrules the Enfold lightbox function on this page? (Blog)
January 30, 2018 at 11:16 am #904723Hi Basilis,
The piece of code that Jordan provided was still in Custom CSS. That blocked the lightbox.
I removed it and now you see what happens; it triggers two different lightboxes at the same time. (Enfold default and from the Custom Facebook Feed Pro plugin.
Is there a way exclude one of them at only this page (Page ID 89)Hope to hear from you.
Regards
January 30, 2018 at 11:19 am #904725January 31, 2018 at 6:10 am #905367Hi,
Please remove the modification then use the following code in the functions.php file.
add_filter( 'body_class', function( $classes ) { if(is_page(array(89))) { $classes = array_merge( $classes, array( 'noLightbox' ) ); } return $classes; });
The code will add the “noLightbox” class attribute to the body tag of the blog page, disabling the lightbox for that particular page.
Best regards,
IsmaelFebruary 5, 2018 at 10:27 pm #908245Hi Ismael,
I deleted all modifications and added the code to the function.php file, but didn’t changed anything.
any thoughts?
February 7, 2018 at 8:51 am #908954Hi KingFilly,
I see the lightbox on the elements in the sidebar and it is not the theme lightbox, it’s some plugin, as for the featured image, there is no lightbox with it. So I am not very clear which lightbox you want to disable. Can you elaborate a bit more?
Best regards,
VictoriaFebruary 7, 2018 at 11:26 pm #909450hi victoria,
thank you for your message.
If you click on a photo in the sidebar, you see it triggers 2 lightboxes. Enfold’s lightbox and the Custom Facebook feed lightbox.
One of the 2 ligthbox needs to be disabled, i prefer the Enfold lightbox.I added the code of Ismael to the function.php file, but this doesn’t solve the problem
February 8, 2018 at 3:26 pm #909805Hi,
I’m sorry but we’re not sure how to disable the plugin’s lightbox. Please contact the plugin author. The theme’s default lightbox is already disabled.
Best regards,
IsmaelFebruary 14, 2018 at 12:52 pm #912238Hi Ismael,
not sure how, but now it just shows the plugin lightbox indeed and the enfold lightbox is disabled. Perfect!
you can close this thread now.February 16, 2018 at 3:10 am #913052 -
AuthorPosts
- The topic ‘How to disable modal lightbox only on one page’ is closed to new replies.