Add Link to gallery image in wordpress

WordPress gives you to create gallery and show on any page. You just need to multiple image and show as a gallery. You can show the images as attachment of gallery image without any URL. I will show you in this article about add the link to gallery image.  When you upload the single image then you can able to attach or add the link to that image and use in your post. you can link it to a custom URL under attachment display settings.

You can upload image from add post form or you can add the image from media uploader section. When you upload the single image then you can add the custom title, URL, description to image but If you want similar functionality for gallery then that is not supported by wordpress yet.

Add Link to gallery image in wordpress

For adding the custom links functionality to wordpress gallery images, you can install and activate WP Gallery Custom Links plugin.

Plugin Overview

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 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).

Add Link to each gallery image in wordpress
Add Link to each gallery image in wordpress

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.

How to Use the Plugin

  • 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

    to ignore the custom links on an entire gallery.

  • Use

    and

    to open all images in an entire gallery in a new window/the same window, respectively.

  • Use

    to keep Lightbox or other onClick events on all custom-linked images in an entire gallery.

  • Use

    to remove links on all images in an entire gallery.

I personally liked this plugin and I used in some of my projects. This plugin gives developer to modify the there functionality using there api. This plugin supports and API. You can use plugin api in your wordpress theme and custom code.

Many websites need to image gallery in there site so you can use this plugin for sure.

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.