WP Gallery Custom Links

Description

screenshot-1 If you’ve ever had a WordPress gallery of staff, product, or other images and needed to link them to other pages but couldn’t, this plugin is for you!
This plugin adds a “Gallery Link URL” field when editing post images. If the image is included in a gallery, the “Gallery Link URL” value will be used as the link on the image instead of the raw file or the attachment post. There are also several additional options (see “Usage” below).
It’s designed to work even if customizations have been made via the post_gallery filter; instead of replacing the entire post_gallery function, it calls the normal function and simply replaces the link hrefs in the generated output. By default, any Lightbox or other onClick events on custom links will be removed to allow them to function as regular links.

Usage

  • See the custom fields added in the screenshots section at http://wordpress.org/extend/plugins/wp-gallery-custom-links/screenshots/.
  • For each gallery image, you can specify a custom Gallery Link URL.
  • Use [none] as the Gallery Link URL to remove the link for that gallery image.
  • For each gallery image, you can select a Gallery Link Target (“Same Window” or “New Window”).
  • For each gallery image, you can select how to handle Lightbox and other onClick events (“Remove” or “Keep”).
  • Use [gallery ignore_gallery_link_urls=”true”] to ignore the custom links on an entire gallery.
  • Use [gallery open_all_in_new_window=”true”] and [gallery open_all_in_same_window=”true”] to open all images in an entire gallery in a new window/the same window, respectively.
  • Use [gallery preserve_click_events=”true”] to keep Lightbox or other onClick events on all custom-linked images in an entire gallery.
  • Use [gallery remove_links=”true”] to remove links on all images in an entire gallery.
Download Plugin

Demo

Donate

If you find this plugin useful and would like to thank me monetarily for the time, energy and ice cream put into it, I would not object. :)
Comments

9 Responses to WP Gallery Custom Links

  1. thomas says:

    sorry for my english because i’m french, i used your plugin and i have a prob for pagination my gallery. i have testing many plugins for pagination (ex: paginated gallery) and my pagination works but my links does not work.
    how to ?

    Thanks

    Reply
  2. Luis says:

    Excellent plugin… hope you can help :) How can i use this for custom post types like products?

    Here is a screen shot… http://luistellado.com/wp-content/uploads/2012/12/Question.png

    THANKS!!!

    Reply
  3. Jesper says:

    Hi Lisa

    Thankyou for your wonderfull plugin. Just what I needed.
    The link is on a panoramapreview, and redirects the user to another webpage and.
    Can you tell me how to use your plugin and have the gallery in two columns?
    like in:
    http://www.virtuelledanmark.dk/wordpress/panoramagalleri/

    Greetings from Kolding Denmark

    Reply
    • Lisa says:

      Hi Jesper,

      Unfortunately, my plugin doesn’t really do anything with layout – it just changes links in whatever markup it is given. But you should be able to select how many images you want per row when creating/editing a WordPress Gallery (the interface has changed a bit in 3.5, but see http://cms.orderofbusiness.net/wp-content/uploads/wordpress-gallery-tab.jpg – “Gallery Columns”). To make more advanced alterations to the gallery layout, you’d probably need to add your own filter to alter the layout (look for examples of the “post_gallery” WordPress filter). Hope this helps!

      Reply
  4. Caroline says:

    Hi, thanks for the plugin! Unfortunately i cant get it to work. The options Gallery Link url and target + link on click effect appear, but in the media library and not in the Nextgen GAllery settings – neither in the edit gallery nor add images to gallery. And i didnt find a way to connect the media libray to the nextgen gallery. am using wp 3.5.1. and the theme Photogrid Responsive. Your help would be greatly appreciated!
    What i would like to do, is to have links on the thumbnail gallery widget where it says “sisonke websites”
    http://sisonke-design.com/kommunikation/ – links, that would lead to this other website!
    thanks a lot in advance for your advice! best gregards

    Reply
    • Lisa says:

      Hi Caroline,

      Unfortunately this plugin is designed to work with the native [gallery] shortcode of WordPress – the NextGen gallery plugin is completely separate. You will probably need to search for a way to handle this within the scope of the NextGen plugin itself. Sorry!

      Reply
  5. David Chartier says:

    Hi, thanks for such a useful plugin. I’m trying to donate but the “donate” button just takes me to the default PayPal login page, not the standard donation page. Any idea what’s up?

    Reply
    • Lisa says:

      Hm, not sure – it brings up a shopping cart-type page when I click it. Although I did get your donation so it looks like you got it to work somehow. Thanks so much! :D

      Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

captcha

Please enter the CAPTCHA text

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>