Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #711637

    Hi support!

    I used hte code to exclude one page where I’m using the Custom Facebook Feed plugin to display videos, that open in their own lightbox. Worked fine, but then I found out, that the blog entries are not showing up anymore.

    exclude : '.page-id-990 , .page-id-990 a,.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',

    I use the Blog-Slider on the Frontpage and the Blog-Masonry on the blogpage. I only added the page-id in the avia.js as described. Have you got an idea why there’s now a problem with the blog entries?

    Cheers,
    Thomas

    #711641

    Hey sedminek!

    Can you please share with us backend access also?

    Thank a lot

    Regards,
    Basilis

    #711647

    Hi Basilis!

    Sure! I also found out, thatt ALL photos aren’t displayed anmore – only this page (in private content) is working properly according to the change in the avia.js.

    Cheers,
    Thomas

    #711650

    Also shrinking header and unstick top bar doesn’t work now. In the enfold-child/js folder there are 2 avia.js files. The avia.js.BAK is the earlier one without the lightbox exclusion.

    #712566

    Hi Basilis!

    I found the problem! I now added the code in line 926 of the avia.js and it works. Before I had it in line 331 – so my fault. Sorry for that!

    Cheers,
    Thomas

    #712581

    well i know one method by having a header.php copy in the child-theme folder
    Open that copy and look for: (it is in line 9 on actual enfold header.php)

    
    $av_lightbox= avia_get_option('lightbox_active') != "disabled" ? 'av-default-lightbox' : 'av-custom-lightbox';
    

    and replace it by :

    
    $av_lightbox= avia_get_option('lightbox_active') != "disabled" && !is_page(990) ? 'av-default-lightbox' : 'av-custom-lightbox';
    

    perhaps there was a hook method – to do this.

    #712610

    Hey!

    That is a bit more valid, as you will avoid loosing the modification on an update.
    Do let us know if it works better for you.

    Thanks a lot

    Regards,
    Basilis

    #751582

    Hi Basilis!
    Hi Guenni007!

    Thanks for your tips! On the one website it worked fine with editing the avia.js, so I didn’t touch it for now. On another website I also need to deactivate the default lightbox for using Custom FB Feed. I now tried the trick with the header.php, but I guess I’ve got tomatoes on my eyes… I still have the default lightbox loading. :-(

    Please have a look over there what is going wrong. This is what I put into the header.php:

    $av_lightbox = avia_get_option('lightbox_active') != "disabled" && !is_page(5519) ? 'av-default-lightbox' : 'av-custom-lightbox';

    Thanks a lot!!!

    Cheers,
    Thomas

    #751590

    Hi!

    Can you also show us which is the page, so we can be able to check if it is proper ID or not?

    Best regards,
    Basilis

    #751594

    Hi!

    Sure – it’s ‘http://quarinthia.at/online/’

    Best regards,
    Thomas

    #751752

    What I found out is, that when I click on ‘load more’ (Custom Facebook Feed) the new items don’t use the Enfold lightbox. But the initially loaded recent FB timeline items still have it…

    #754866

    Hey!

    But the initially loaded recent FB timeline items still have it…

    Once you clicked on the load more button, the lightbox is working but it’s NOT the default lightbox. It’s the lightbox of the facebook plugin (cff-lightbox-container).

    Cheers!
    Ismael

    #754956

    Hi Ismael!

    I know, that the new loaded items use the CFF Lightbox – that’s what I wrote. But I want to disable the Enfold Lightbox completely on this page! I don’t know why it’s still loading although I edited the header.php.

    So maybe you can help me out DISABLING the ENFOLD-Lightbox on this page (ID=5519). And what code would I have to use if I wanted to disable the default lightbox on a second page?

    Thanks!

    Cheers,
    Thomas

    #756129

    Hey!

    Please add this filter in the functions.php file:

    add_filter( 'body_class', function( $classes ) {
    	if(is_page(13)) {
    		$classes = array_merge( $classes, array( 'noLightbox' ) );
    	}
        return $classes;
    });
    

    Adjust the is_page value. This code should disable the theme’s lightbox on any page.

    Best regards,
    Ismael

    #756300

    Hi Ismael!

    Thanks a lot for this code! It works fine on that specific page. I’ve got 2 more questions based on this:

    1. How do I set this for a second page? Would this be “if(is_page(13,14))”? I guess NO…

    EDIT: Just found the solution for this: if( is_page( array( 13, 14) ) ) Thanks a lot @Guenni007

    2. What about the header.php now? Can I delete it now in the Enfold Child folder?

    EDIT: Also deleted the header.php and it works fine!

    Thanks a lot!

    Cheers,
    Thomas

    #756735

    Hi!

    1.) For the is_page function, please refer to this link.

    // https://developer.wordpress.org/reference/functions/is_page/

    2.) Yes, you can delete the header.php file.

    UPDATE: I didn’t notice the edits. We’ll close this thread now. Let us know if you need anything else. :)

    Best regards,
    Ismael

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Disabled Lightbox on one page lead to blog posts not showing in slider & masonry’ is closed to new replies.