Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #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.JS

    I use the Enfold 2017 theme. Maybe it is located some where else? Or its named differently?
    link to website in private content

    #902792

    Hey KingFilly,

    Which image do you need to remove the lightbox on? Can you please send a screenshot?

    Best regards,
    Jordan Shannon

    #902807

    Hi 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.
    #902831

    Hi,

    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 Shannon

    #902837

    hi 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.
    #902958

    Hi,

    Apologies, It should have only effected the lightboxes on the page link you sent over, did this not occur.

    Best regards,
    Jordan Shannon

    #903000

    I 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?

    #904200

    Hi,

    I loaded the page with clear cache and I cant see any lightbox at all.
    Has it been fixed?

    Best regards,
    Basilis

    #904702

    Hi 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)

    #904723

    Hi 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

    #904725

    As mentioned before I tried this solution, but i can’t find the piece of code text that is mentioned by Yigit:

    exclude : ‘.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*=”dropbox.com”]’,

    It isn’t in the Avia.js file…

    • This reply was modified 6 years, 10 months ago by KingFilly.
    #905367

    Hi,

    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,
    Ismael

    #908245

    Hi Ismael,

    I deleted all modifications and added the code to the function.php file, but didn’t changed anything.

    any thoughts?

    #908954

    Hi 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,
    Victoria

    #909450

    hi 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

    #909805

    Hi,

    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,
    Ismael

    #912238

    Hi 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.

    #913052

    Hi,

    Alright. Please let us know if you need anything else. :)

    Best regards,
    Ismael

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘How to disable modal lightbox only on one page’ is closed to new replies.