WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Gallery images link to attachment_id instead of image url... (4 posts)

  1. Joshuwar
    Member
    Posted 4 years ago #

    Hi, thanks for reading.

    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:

    http://wordpressblog.co.uk/blogfolder/?attachment_id=17

    instead of

    http://www.wordpressblog.co.uk/blogfolder/wp-content/uploads/2009/10/image_title.jpg

    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.

    Appreciated,

    J

  2. deWINTER
    Member
    Posted 4 years ago #

    Hi,

    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.

    Jo

  3. deWINTER
    Member
    Posted 4 years ago #

    http://codex.wordpress.org/Using_the_gallery_shortcode

    This is the page link, which it didn't include in the previous post.

  4. Joshuwar
    Member
    Posted 4 years ago #

    Hi! Sorry about the delay- That's got it, absolutely.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic