Archived topic
link function on featured images?
10 replies · Started by Daniele on July 23, 2019
Hi, yours is a very nice theme, but it lacks the function that allows you to put a link to the images in evidence! or am I wrong, why can't I find it?
Thank you,
Daniele
Hi there,
I'm not too sure I understand - can you explain a bit more?
Let me know :)
Hi Tom, in this wordpress discussion we talk about what I mean, but this is an integrated function in many themes..
https://wordpress.org/support/topic/how-to-add-hyperlink-to-posts-featured-image/
Thanks,
Daniele
I'm talking about putting a link in the image shown above, at the top of each article :)
Is this what you are looking for?
https://generatepress.com/forums/topic/add-custom-link-to-featured-image-on-post-page/#post-693006
Hi Leo,
EXACT! The code must be inserted in the function.php file, right?
Thanks,
Daniele
If you are referring to the function.php file in the child theme then yes:
https://docs.generatepress.com/article/adding-php/
It would be nice to be able to make these changes through the theme, without having to create a child, in the "elements" section :)
You can use the Code Snippets plugin suggested in the article if you don't want to use the child theme.
I use Code Snippets most of the time for PHP.
Filters cannot be used in Elements unfortunately.
Thanks Leo! The script works perfectly, and even the plugin is very convenient! Your assistance is always useful :)
Daniele
Glad I could help :)