let me clarify. I mean the post or project that the image is in.. not simply click to a post of itself. thanks!
Can you explain a little more on what you are trying to do?
Is this going in a template file? How will it know what link/post to enter? Are you using custom fields?
basically it’s for a ‘portfolio’ section that has it’s featured image displayed on the homepage, but it’s thumbnail on the homepage doesn’t click to it’s post. does that make sense?
I would love to make a small icon in the corner of the featured image that clicks to the post/portfolio that the featured image is from
Find the code in your template that is the link portion that heads to the portfolio.
Copy the link and wrap it around the <img /> that creates the thumbnail.
but how can I specify each individual post link?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Doesn’t the visual editor in the dashboard give you an option to hyperlink the image?
We wouldn’t be able to help unless we can see the site and the code in your template that is creating the portfolio.
Hm, I am working on mamp on my local computer so I don’t have it at a live link to post right now. could I post my code here?
Do it on http://pastebin.com/ and paste the link to that here if it is long. Under 10 lines of code just paste it here and wrap in the code tag you see in the editor.
awesome. thanks for telling me about pastebin!
the header code: http://pastebin.com/ERaB90A7
index code: http://pastebin.com/70bFqA6u
functions code: http://pastebin.com/0nhTQYWK
hi there ! no luck or is it just a busy day?
got it!
<?php the_permalink(); ?>
that’s all I needed 🙂