Hi,
I would like the_post_thumbnail function to output the thumbnail that links to the large (not the original) version of that same image.
Is there a way I can do that using functions.php ?
For now it simply outputs the thumbnail url.
Many thanks
Hi,
I would like the_post_thumbnail function to output the thumbnail that links to the large (not the original) version of that same image.
Is there a way I can do that using functions.php ?
For now it simply outputs the thumbnail url.
Many thanks
Sure thing!
Try this:
the_post_thumbnail('large');
Haven't tried it but 'full' might work as well.
or if you want to specify the size, try this:
the_post_thumbnail( array(100,100) );
OK I was not clear enough, sorry about that.
the_post_thumbnail outputs:
<img src="http://link.to/img-thumbnail.jpg" />
I would like it to output:
<a href="http://link.to/img-large.jpg"><img src="http://link.to/img-thumbnail.jpg" /></a>
or simply:
http://link.to/img-large.jpg
if possible?
Ah, got it.
So I imagine that you'd want something like this:
get's thumbnail id
$id = get_post_thumbnail_id();
//This will output the link to the full image with a thumb that's no more than 48x48.
the_attachment_link( $id, false, array(48, 48) );
This link should help with tweaking...
http://codex.wordpress.org/Template_Tags/the_attachment_link
Thanks ! ;-)
Thanks... I ended up opening another thread. ;-)
This topic has been closed to new replies.