By default, the photos in the Instagram Feed will link to the photos on Instagram, however, you can use custom code snippets to link each photo to a unique URL of your choosing.
Linking all photos to the same URL
To do this:
1) First disable the plugin’s popup lightbox (Instagram Feed > Customize > Photos > Disable Pop-up Lightbox)
2) Add a class to the feed shortcode so that the link is only applied to posts in that feed:
$('.custom-link-feed .sbi_photo').attr('href', 'https://yourlink.com');
Link individual photos to different URLs
There are two methods to do this. You can manually change each link, or if you can add the full URL to the caption of your Instagram posts (on instagram.com) then you can automatically make that post link to the page in the caption.
First, disable the plugin’s popup lightbox (Instagram Feed > Customize > Photos > Disable Pop-up Lightbox)
Then you need to find the ID of each photo. You can do this by right clicking on the photo, clicking “Inspect Element” and then making copying the ID attribute (screenshot). It will look similar to this: sbi_1253736523657580376_10145706.
In the Pro version you can also find the ID by viewing your feed, clicking on the photo to launch the popup lightbox, and then clicking on the ‘Hide Photos (admin)’ link.
$('#sbi_1253736523657580376').find('.sbi_photo').attr('href', 'https://yourlink1.com'); $('#sbi_1253665037575982435').find('.sbi_photo').attr('href', 'https://yourlink2.com'); $('#sbi_1248694870995570598').find('.sbi_photo').attr('href', 'https://yourlink3.com');
Full Link URL in Caption Method
Note: This feature is only available in the “Pro” version.
We’ve added a feature to the Pro version of the plugin to make linking your posts to custom URLs really easy and painless. Simply add the URL you’d like to link the post to in the caption of the post on Instagram. Then enable the following setting in our plugin: Instagram Feed > Customize > Link posts to URL to caption. For more detailed directions on creating a shoppable feed, please see this article.