-
AuthorPosts
-
April 28, 2016 at 4:19 pm #623859
Hi,
i would like to disable enfold lightbox only in one page.
As you can see here: http://domingodigitalprojects.com/domingocommunication/ when you click a social image and then close it, there’s two lightbox. Is there a way to turn off modal lightbox of enfold only on this page?Best regards,
Nic
April 28, 2016 at 4:24 pm #623864Hi piemoo!
Please go to Enfold/js/avia.js and find
exclude : '.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',
and change it to
exclude : '.page-id-990 , .page-id-990 a,.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',
If you are using a child theme, please add following code to Functions.php file of your 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 );
and move modified file inside /js folder
Cheers!
YigitApril 29, 2016 at 6:32 pm #624685Thank you Yigit,
as always impeccable support!Cheers,
Nic
May 2, 2016 at 6:29 am #625463September 18, 2016 at 1:15 pm #688104Hi I’m looking to disable the lightbox on one page also but I don’t understand what you mean by “and move modified file inside /js folder”.
Can you please explain?
September 18, 2016 at 3:39 pm #688135Hey!
He means you have to create a child theme, then while you are using the functions to over-write your default JS, you will have to use the folder to move the JS there.
Let us know if we can do anything else foe you
Regards,
BasilisSeptember 18, 2016 at 4:54 pm #688146I’m still unclear…
So I go to Enfold/js/avia.js and edit the code. Then I go to functions.php in the child theme and add in the other code and save it.
Then I move the file in Enfold/js/avia.js to the child-theme folder? Or do I make a folder name /js and put the avia.js file in that folder (child-theme/js/avia.js)?
September 18, 2016 at 5:14 pm #688147I suggest you to use the first option yigit wrote because i’m not sure you’re familiar with child themes.
Cheers,
NicSeptember 18, 2016 at 5:23 pm #688149I”m using a child theme right now. I’m just confused when he said “and move modified file inside /js folder”.
So if I want to use the child theme functions.php method I have to move the modified (Enfold/js/avia.js) file inside a newly created /js folder in the child theme folder?
September 18, 2016 at 5:34 pm #688152you create a folder “js” in your child-theme folder (via ftp)
the modified avia.js comes to that folder (you can leave the orginal avia.js in the folder enfold/js/ untouched because the entry in the child-theme functions.php is for loading the new one and not the original one of parent theme.September 18, 2016 at 7:44 pm #688184Hey!
@Guennie007 made is as clear as possible, but what Yigit wrote is the exact process.
If you do follow that, you will have it working.Thanks a lot for your understanding
Regards,
BasilisNovember 13, 2016 at 12:03 pm #711604Hi 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.
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 2:44 pm #711619Hi!
Please consider to create a new topic, so we can be able to review and help you out.
Thanks a lot
Cheers!
Basilis -
AuthorPosts
- The topic ‘How to disable modal lightbox only on one page’ is closed to new replies.