Tagged: Lightbox
-
AuthorPosts
-
April 7, 2015 at 12:25 pm #424590
There is an option the theme settings for the lightbox, which either switches all on or off. I would like to know if it’s possible to have the Enfold lightbox for everything accept a NextGen gallery or specific pages?
I have a shop that I use the ecommerce part of NextGen for and it has a small conflict with the theme lightbox.
Cheers
JulieApril 7, 2015 at 8:12 pm #424915Hey bluff03!
Try opening up /enfold/js/avia.js and change line 895 from this.
exclude : '.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added',To this.
exclude : '.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, .nextgen_pro_lightbox',Regards,
ElliottApril 8, 2015 at 1:10 pm #425234Elliott, that worked fabulous, thank you.
Another question, will I have to make this change with every update of the theme, or is there a way I can add it to the child?
Cheers
JulieApril 8, 2015 at 1:17 pm #425240Hey!
Please copy your modified avia.js file to your child theme inside JS folder and then 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 );Best regards,
YigitMay 20, 2015 at 2:42 pm #447106Yigit,
Your code disables the link editor for pages and posts. Could someone please provide an update so we can place the code in our child theme functions file?Thanks
May 22, 2015 at 7:07 pm #448553Hey!
Not possible, you need to edit js/avia.js in order to have this mod, either in the theme or child theme.
Regards,
JosueJune 8, 2015 at 4:13 pm #456162I have this in my child theme as you have suggested and it has no effect. If I edit the code in the main theme, it works.
Suggestions?
Thanks
June 8, 2015 at 6:45 pm #456283Hey!
Try adding this at the very end of your theme / child theme functions.php file:
function 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_enqueue_scripts', 'change_aviajs', 100 );Cheers!
JosueJune 8, 2015 at 6:53 pm #456288Perfect.
Thank you Josue!
-
AuthorPosts
- The topic ‘Disable Lightbox on Specific Page or Gallery’ is closed to new replies.
