To add external URLs to featured images in WordPress, you’ll typically need to use a plugin or custom code. Here’s a step-by-step guide using a plugin called “Featured Image Link”:
see this YT video on how to do basic anchor linking in basic HTML:
WordPress: How to hyperlink to anchor ids or anchor tags without plugins (e.g. Table of Contents)
Using WordPress Plugin
- Install and Activate the Plugin:
- Go to your WordPress admin dashboard.
- Navigate to “Plugins” > “Add New.”
- Search for “Featured Image Link.”
- Install and activate the plugin.
- Set Up the Plugin:
- Once activated, go to “Settings” > “Featured Image Link” in your WordPress admin dashboard.
- Configure the plugin settings according to your preferences. You can choose whether to enable/disable the link on the featured image, set the link behavior, and more.
- Edit or Create a Post/Page:
- Edit an existing post/page or create a new one.
- Set the featured image by clicking on the “Set featured image” link and uploading/selecting an image.
- Add External URL to Featured Image:
- Below the featured image, you should see a new field labeled “Featured Image Link” or similar, depending on the plugin.
- Enter the external URL you want to link to in this field.
- Update/Publish the Post/Page:
- Once you’ve added the external URL to the featured image, update or publish the post/page.
- Test the Link:
- Visit the post/page on the front end of your website.
- Click on the featured image to ensure that it redirects to the external URL you specified.
Using custom code and function without WordPress plugins
Some resources are found below in achieving setting an option to upload featured image via the image URLs without plugins:
“Set Feature Image” with URL (WordPress)
Function to set the featured image/thumbnail?
If you prefer not to use a plugin, you can achieve similar functionality with custom code. You would need to add custom fields to your post editor to input the external URL for each featured image and then modify your theme files to include the link. Some examples using custom code and WordPress function are provided above.
However, using a plugin is often more straightforward and doesn’t require coding knowledge.