I’ve been using gallery shortcodes wired directly into single post template files for a while now, with no issues whatsoever. (eg. http://www.tvbomb.co.uk)
So it surprised me recently as I was building a new site with this technique, to find that instead of linking to the image file, gallery thumbnails were automatically linking to an attachment id, for example:
This means that there’s another page to click through to get to the full size (or lightboxed, in this case) image.
I’ve no idea why this has started happening, I’m using clean installs of 2.8.5, no plugins for testing, and have created the theme from scratch (so there are no weird behaviours I’m unacquainted with).
I’ve tried setting the image URL in the media manager for a post to ‘file url’ but this makes no difference.
Probably I’m missing something embarrassingly obvious, but it’s annoying, so if anybody has any ideas of what could be doing this, or has experienced the same problems, I’d be real happy for y’all insights.
I have been using Next Gen Gallery plugin for ages, but just today I decided to have a go at using the WordPress Gallery shortcode instead. So far, so interestingly good, still getting my way around it.
This page is useful:
And right at the bottom it mentions the link option in the gallery shortcode. Like this: [gallery link="file"]
This makes the thumbnail link to the image file rather than the attachment’s file (which is the default).
I have just tried it and it seems to work. Hope this is helpful.