Any way to add a link to the featured image?

Sutra

Investor and Business Mentor
BuSo Pro
Joined
Oct 28, 2015
Messages
840
Likes
917
Degree
3
Question for you smarty pants. Is there way to add a link to the featured image in wordpress? I haven't been able to figure how to do it, and haven't found a modern plugin for it.

To get around the issue I turn off the Featured Image function and manually add the image in the post. However, I tested the actual featured image and it loads almost IMMEDIATELY. Whereas, when I manually insert the image, it takes 2 - 6 seconds to show up. Obviously, using the actual featured image is much better. But I also add links to my images in order to increase pageviews/revenue. So want to be able to add a link to the featured image that only applies when the featured image is shown in the post.

Anyone know how to do this?
 
I don't have the time to do a full on exposé on it but I can lead you down the path for now.

Wrap the featured image code in an <a href=""> tag and then where the URL would go, use a custom field to populate it with the link:

https://codex.wordpress.org/Custom_Fields

You can create a custom field with the meta key always being the same name, then you can populate each piece of meta data individually on each post. Depending on which template you put the code in, you can set it up far almost anything from different categories to post types, etc. You can also use If Loops too.
 
Back