Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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
    Julie

    #424915

    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

    #425234

    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

    #425240

    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

    #447106

    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

    #448553

    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

    #456162

    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

    #456283

    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

    #456288

    Perfect.

    Thank you Josue!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Disable Lightbox on Specific Page or Gallery’ is closed to new replies.