Title: Setting / Modifying &quot;link=&quot; for Gallery Shortcode
Last modified: August 20, 2016

---

# Setting / Modifying "link=" for Gallery Shortcode

 *  [mtwelve](https://wordpress.org/support/users/mtwelve/)
 * (@mtwelve)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/setting-modifying-link-for-gallery-shortcode/)
 * Hello,
 * I’ve searched endlessly but could someone tell me how to add a filter to always
   set the Gallery shortcode to link to the image file?
 * I’ve seen bits about filter the title etc but nothing concrete and nothing about
   editing the ‘link’ attribute.
 * Here is some code for excluding a PT from the gallery if it gets people in the
   right direction: [here](http://stackoverflow.com/questions/4337999/wordpress-exclude-the-post-thumbnail-from-gallery-shortcode)
 * Many Thanks!

The topic ‘Setting / Modifying "link=" for Gallery Shortcode’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [mtwelve](https://wordpress.org/support/users/mtwelve/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/setting-modifying-link-for-gallery-shortcode/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
