-
AuthorPosts
-
November 13, 2016 at 4:27 pm #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,
ThomasNovember 13, 2016 at 5:36 pm #711641Hey sedminek!
Can you please share with us backend access also?
Thank a lot
Regards,
BasilisNovember 13, 2016 at 5:46 pm #711647Hi 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- This reply was modified 8 years, 1 month ago by kaerntneringraz.
November 13, 2016 at 6:00 pm #711650Also 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.
November 15, 2016 at 7:12 pm #712566Hi 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,
ThomasNovember 15, 2016 at 8:47 pm #712581well 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.
November 15, 2016 at 9:28 pm #712610Hey!
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,
BasilisFebruary 24, 2017 at 8:50 pm #751582Hi 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,
ThomasFebruary 24, 2017 at 9:06 pm #751590Hi!
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,
BasilisFebruary 24, 2017 at 9:11 pm #751594February 25, 2017 at 11:49 am #751752What 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…
March 3, 2017 at 7:33 am #754866Hey!
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!
IsmaelMarch 3, 2017 at 10:53 am #754956Hi 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,
ThomasMarch 6, 2017 at 4:50 am #756129Hey!
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,
IsmaelMarch 6, 2017 at 11:06 am #756300Hi 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 @Guenni0072. 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- This reply was modified 7 years, 9 months ago by kaerntneringraz.
March 7, 2017 at 5:26 am #756735Hi!
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 -
AuthorPosts
- The topic ‘Disabled Lightbox on one page lead to blog posts not showing in slider & masonry’ is closed to new replies.