WordPress.org

Ready to get started?Download WordPress

Forums

WordPress gallery link by default to file (8 posts)

  1. IoanPokorny
    Member
    Posted 1 year ago #

    Is there a way to make the gallery shortcode behave like [gallery link="file"] even if I forget to specify it?

    I have lots of posts and I woke up now that I have not entered the link="file" in the shortcode and all of them link me to the attachment page.

    Is there a way to make it be default to file instead of attachment page?

    Thanks a lot

  2. supportie
    Member
    Posted 1 year ago #

    Hello,

    You can access the default options page by going to http://yoursite/wp-admin/options.php and setting the "image_default_link_type" option to "file".

    Otherwise you can try the cleaner wordpress gallery plugin.

    Hope that helps!

  3. IoanPokorny
    Member
    Posted 1 year ago #

    Thank you supportie for your reply. Have already tried options.php and changed the value to file but nothing happens. If I click on an image, I still get directed to the attachment page.

    Any ideas why this might happen?

  4. IoanPokorny
    Member
    Posted 1 year ago #

    If I install cleaner gallery do I need to alter any of my shortcodes?

  5. supportie
    Member
    Posted 1 year ago #

    Try setting it to "none"

  6. IoanPokorny
    Member
    Posted 1 year ago #

    Thank you for your patience and for getting back to me, but regardless of what I enter in that field, nothing does change. I still get the gallery pictures link to the attachments page rather than pop-up in a lightbox (as it does if I specify link="file".

    Sample: http://test3.glutenfreeclub.com/chipotle-cheese-crisps/ (gallery under the recipie)

    How can I use the plugin you have described?

  7. supportie
    Member
    Posted 1 year ago #

    No problems. I'm guessing changing that option wont override your past images, it will act as default for future ones.

    If you want to use the lightbox/colorbox with the cleaner gallery plugin, there are some detailed instructions here http://springthistle.com/updates/colorbox-with-wordpress/

  8. IoanPokorny
    Member
    Posted 1 year ago #

    If i install cleaner gallery will it interpret simple [gallery id's...] as link="file"? I don't want to edit 1000+ posts

Topic Closed

This topic has been closed to new replies.

About this Topic