Override the Beaver Builder LightBox Plugin

Here is a quick guide on how to override the Beaver Builder Lightbox plugin in which you may wish to run another lightbox plugin instead.

If you are using the Beaver Builder plugin, then add in your theme’s function.php

 add_filter( 'fl_builder_override_lightbox', '__return_true' );

Additionally, if you are running the Beaver Builder Theme then you need to either disable the lightbox in the Customizer under Content > Lightbox or dequeue the script and style it uses which is the Magnific Jquery Lightbox plugin.

If it is still loading try…

 add_action( 'wp_enqueue_scripts', 'mythemename_all_scriptsandstyles', 999 );
/**
 * Remove BB Plugin LightBox
 * @since 1.0.0
 */
 function mythemename_all_scriptsandstyles() {
    // Load JS and CSS files in here
    wp_dequeue_script('jquery-magnificpopup');
    wp_dequeue_style('jquery-magnificpopup');
 }

Some plugins will give you options to enable/disable other lightbox scripts, VenoBox Lightbox has an option to disable BB lightbox which I use in specific sites.