WordPress.org

Ready to get started?Download WordPress

Forums

Gallery Links to Attachement Page instead of Media file (4 posts)

  1. twistedsymphony
    Member
    Posted 1 year ago #

    My default is that images link directly to the media file,
    When I upload images I make sure they're set so that they link to the media file.

    When I create a gallery I make sure it's set to link to the media file.

    I have hundreds of pages with galleries that are all setup this way, they all worked fine until the most recent WP update.

    Now wherever I have a gallery every image links to the Attachment page instead of the media file... I've gone into some of the individual galleries and triple checked the settings, everything is set to link to the media file, I've re-saved, even deleted and recreated galleries, and they still link to the Attachment page.

    I've disabled all of my plugins (none of which are related to images or galleries) and the galleries still link to the attachment page.

    Individual images inserted into the page work fine... it's just when I use wordpress galleries. Any help would be appreciated.

  2. zezz
    Member
    Posted 1 year ago #

    Hey twistedsymphony,

    Had the same problem, but discovered that if you go to gallery settings and switch the settings to link to attachment page and then change it back to media file linking it will start working again.

    I wonder if anyone knows how to disable attachment page linking in WP?

  3. zezz
    Member
    Posted 1 year ago #

  4. twistedsymphony
    Member
    Posted 1 year ago #

    Thanks for that!

    I've been tearing my hair out trying to figure this out. this seems like a legit bug in wordpress. If you look at the gallery placeholder in on the page the link="file" option is missing when it's first generated, once you switch to attachment page then back to file it forces WP to generate that code.

    I'm going to hold off on the finkaboutit solution for the time being as I really don't like modifying core WP files if I can avoid it since it breaks every time you update to the latest version.

Topic Closed

This topic has been closed to new replies.

About this Topic