- When you have added gallery shortcode add additional parameter link=”custom_url”. So that your shortcode looks something like this gallery size=”gallery-large” type=”standard-gallery” include=”COMMA_SEPARATED_LIST_OF_IMAGE_IDS” orberby=”menu_order” link=”custom_url” order=”DESC” columns=”3″
- Go to Media > Library.
- Click on Edit for image you want to add custom link.
- Set custom link by adding it to Custom Link field (see image below).
- Click on Update Media.
Important! Keep in mind that you can only add links to standard gallery images