Tagged: Lightbox
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
Julie
Hey 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,
Elliott
Elliott, 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
Julie
Hey!
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,
Yigit
Yigit,
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
Hey!
Not possible, you need to edit js/avia.js in order to have this mod, either in the theme or child theme.
Regards,
Josue
I 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
Hey!
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!
Josue
Perfect.
Thank you Josue!