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, 999 );

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


Add the dequeue to a wp_enqueue_scripts action.

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 certain sites.

1 Comment

  1. Hans Joerg Klemenz on December 22, 2017 at 10:13 pm

    add_filter( ‘fl_builder_override_lightbox’, __return_true, 999 );

    does not work with PHP 7.2, should probably be

    add_filter( ‘fl_builder_override_lightbox’, ‘__return_true’, 999 );

Leave a Comment