How to Add Custom Links to Gallery Images in WordPress

When adding an image in WordPress, you can make it so it links to a specific page. However when you are creating a gallery, your choices are either to link the image to the attachment page or the media file. In this article, we will show you how to add custom links to gallery images in WordPress.

First, let’s take a look at how to add a custom link to a single image in WordPress. You would upload your image file using the media uploader. Once it is uploaded, you can link it to a custom URL under attachment display settings.

Adding custom link to a single image in WordPress

Simple wasn’t it? But this setting is not available when you are creating a gallery in WordPress. You can link a gallery image to either attachment page or media file, but you can not add custom links to individual images in gallery.

Adding Custom Links to Gallery Images

To add gallery custom links functionality to gallery images in WordPress, all you need to do is install and activate WP Gallery Custom Links plugin.

It works out of the box, so there are no settings for you to configure. Simply go to a post or page and create a new gallery. You will see the custom link meta fields for individual images in gallery.

Adding custom link to gallery images in WordPress

You can link an image in the gallery to any post, page, or even an external website. You can also choose whether you would like the link to open in the same or a new window.

The plugin works very well with any other plugins you may be using to display images in lightbox popup or carousel. It also allows you to keep or disable onclick events for an individual image in the gallery.

click here for more

Leave a Reply