Using the FooBox Lightbox plugin instead of the default Thickbox

GravityView uses the WordPress included Thickbox plugin to generate the lightbox for images and PDFs. 

You may want to use a different lightbox solution. If you use the  FooBox Image Lightbox plugin, this is how you can override the GravityView lightbox to use the FooBox lightbox instead:

  • Disable the "Enable lightbox for images" setting in the Edit View "View Settings" settings tab
  • Paste the following code into your theme's functions.php file (see how):
  • // GravityView: Override the default lightbox by FooBox
    add_filter( 'gravityview/fields/fileupload/link_atts', 'my_gv_image_link_atts', 10, 2 );
    function my_gv_image_link_atts( $link_atts, $field ) { 	
        $link_atts['class'] = 'foobox';
        return $link_atts;

And there you go: images will now be using Foobox instead of the GravityView (and WordPress) default!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.