WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Always link to the Image File not Attachment Page? (6 posts)

  1. fizzyfozzy
    Member
    Posted 3 years ago #

    Is it possible to make images always link to the Image File and never the attachment page?

    Or for it to be the default setting at least?

  2. Mark / t31os
    Moderator
    Posted 3 years ago #

    Go to yoursite.com/wp-admin/options.php and scroll down the page until you see image_default_link_type, remove any value that is in the field, then scroll to the bottom of the page and hit save.

    Images will now not link by default.

    Other possible values are.

    1. file - links to the attachment
    2. post - links to the attachment page
  3. fizzyfozzy
    Member
    Posted 3 years ago #

    Cheers, just what I needed.

  4. Mark / t31os
    Moderator
    Posted 3 years ago #

    You're welcome.. :)

  5. scottnelle
    Member
    Posted 3 years ago #

    Is there any such option for Gallery shortcodes? I'd like to switch the default behavior to link directly to the file because I have a client that just can't remember to set it each time.

    Digging around in wp-includes/media.php it doesn't appear that there's an option for the default here, but if you want to double-check me I'd appreciate it. :-)

  6. CRIStoGi
    Member
    Posted 3 years ago #

    hm... but does this setting only work for the curent user or for all users always?

    i'm creating a site for a client, where i want that the default would be link to file and he can't change it - never :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.