I am using WP 3.5.1 and lightbox plus 2.5.5

I have my lightbox set to "Use for WP Gallery"

Lightbox is working successfully on one of my posts with a single image, but on another post I have 3 images and they are set to "media file" but when I go to the post, they are navigating to the attachment page instead, thus lightbox is not working.

Any thoughts on why its navigating to the attachment page even though the gallery has been set to media file? I have tried recreating the gallery with no success as well as reuploading the images.

Gallery example --> http://santacruzsurvivors.com/2013/01/20/aquaponics-construction-part-2/

Notice: get_theme_data is deprecated since version 3.4! Use wp_get_theme() instead. in /home/www/santacruzsurvivors.com/wp-includes/functions.php on line 2839

Notice: Undefined variable: supported in /home/www/santacruzsurvivors.com/wp-content/themes/tank/inc/library.php on line 396

Warning: preg_match() [function.preg-match]: Compilation failed: missing ) at offset 166 in /home/www/santacruzsurvivors.com/wp-content/themes/tank/inc/library.php on line 396

Warning: preg_match() [function.preg-match]: No ending delimiter '/' found in /home/www/santacruzsurvivors.com/wp-content/themes/tank/inc/library.php on line 396

Notice: Undefined index: page in /home/www/santacruzsurvivors.com/wp-content/themes/tank/inc/administrator.php on line 16

Notice: Undefined variable: format in /home/www/santacruzsurvivors.com/wp-content/themes/tank/inc/library.php on line 456
Notice: Undefined variable: class in /home/www/santacruzsurvivors.com/wp-content/themes/tank/inc/library.php on line 359
class="single single-post postid-30 single-format-standard logged-in admin-bar no-customize-support content-r" layout='2'>
  • Are you adding rel="lightbox" as per the plugin instructions to each image ?
    – Wyck
    Jan 26, 2013 at 0:36
  • instructions indicate if "Use for WP gallery" is checked that all galleries will be converted to lightbox galleries by default.
    – Brian
    Jan 26, 2013 at 0:40
  • the js says $("a[rel*=lightbox]").colorbox so either change the js or add a rel tag.
    – Wyck
    Jan 27, 2013 at 6:41
  • 1
    This is the ticket for Wordpress where they are fixing this bug. It looks like it might be fixed in version 3.5.2. core.trac.wordpress.org/ticket/23298.
    – Jay K
    Mar 14, 2013 at 17:50
  • Try the cleaner gallery plugin. In the settings you can select the image file as the link and it works. wordpress.org/extend/plugins/cleaner-gallery May 1, 2013 at 5:54

1 Answer 1


I have the Same issue, its a bug in 3.5.1

You have to select "Attachement page" from the dropdown menu, then go back to "Media file".. This will add gallery link="file" ids= to your script (which is missing)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.