Okay
  Public Ticket #3018635
Disable Nivo Lightbox
Closed

Comments

  •  3
    ganix33 started the conversation

    Hi,

    I would like to use my own lightbox plugin to use it in posts and pages. I noticed that Nivo is loaded in posts and thus when I click on an image both Nivo and my lightbox plugin fires at the same time. I don't use portfolios.

    So my question is: how can I completely disable Nivo Lightbox?

    Thanks.

  • [deleted] replied

    Hi ganix33,

    You can add this code in the functions.php file.

    add_action( 'wp_enqueue_scripts', function () {
       kalium_dequeue( 'nivo' );
    }, 100 );

    and it will completely disable the Nivo lightbox from Kalium theme.

    Thanks!

  •   ganix33 replied privately
  • [deleted] replied

    HI ganix33,

    I wanted to log in on your site but it is not working from my end. See video: https://d.pr/v/0CFNps

    Can you please check it first? Thanks!

  •   ganix33 replied privately
  • [deleted] replied

    Ok then.

    We just added this PHP code in your functions.php file:

    add_action( 'wp_print_scripts', function () {
       if ( is_single() ) {
          kalium()->enqueue->deregister_enqueue_group( 'light-gallery' );
          wp_add_inline_script( 'kalium-main-js', 'jQuery( document ).ready( function() { Kalium.Media.lightbox = function() {} } );' );
       }
    }, 100 );

    and now Nivo doesn't open on your site.

    Thanks!

  •  3
    ganix33 replied

    OK, tested and working.

    Thanks a lot!!!

  • [deleted] replied

    Happy to hear that it is working as it shouldsmile.png

    Have a great weekend!

    P.S: If you like the theme, it would help us a lot if you could give us a five-star rating on Themeforest from your Downloads tab.

    A huge thank you from me and Laborator in advance.