Gallery Bug in WordPress 3.5.1

There is a bug in the gallery function that’s built into WordPress 3.5.1. You should be able to choose what the thumbnail image links to (either the media file or an attachment page), however the choice is not respected when the gallery is inserted.

For my themes that have a lightbox, that causes an error that says you need to specify a size.

There is a WordPress Track Ticket about this problem should be fixed for 3.5.2. Until then here is a workaround so you can link to the file.

  1. Create your gallery as normal and insert it into your page/post.
  2. Switch from the Visual editor to the “Text” editor by clicking the tab in the top right of your main content box.
  3. Locate your gallery in your post. It will look something like this:

  4. Delete the closing ] and replace it with this:

  5. That will make your complete gallery look something like this:

  6. Publish or update your post

That should be a workaround until the fix is added to the WordPress core.


Update

I’ve learned that if you toggle the drop-down that lets you choose between attachment page and file for the link back and forth, it will let the link to the file actually work. You might give that a try too if you’d rather not edit the shortcode directly.

Organized Themes

As the owner of Organized Themes, I'm here to help you create a fantastic website. Let me know how I can help.