How Do I Add Custom Links to Gallery Image in WordPress Elementor?

In order to add custom links to gallery images in WordPress Elementor, you first need to create a custom link type in your theme. To do this, open your theme’s functions.php file and add the following code:

function mytheme_custom_links() { return array( ‘custom-link-type’ => ‘gallery’, ‘url’ => ‘gallery/image-#{$slug}’, ); }

Next, you need to add the custom link type to your gallery images in WordPress Elementor. To do this, open your gallery and click on the image you want to customize. Under the ‘Custom Links’ tab, you will see the custom link type option.

Enter the custom link type you created in the ‘Custom Link Type’ field and enter the url for the gallery image in the ‘Url’ field. Click ‘Save’ to save your changes.

Finally, you need to add the custom link to your gallery’s description. To do this, open your gallery’s description and add the following code: