linking a the_post_thumbnail() result
-
I would think this would be easy, but I am having issues finding the right solution….
My code is
<?php the_post_thumbnail(array(200,150)); ?>
However, it doesn’t make the thumbnail clickable. I want to be able to click the thumbnail and have it take me to the attachments.php template to show the bigger version.
I tried
<a href="<?php post_permalink() ?>"><?php the_post_thumbnail(array(200,150)); ?></a>
and
<a href="<?php wp_get_attachment_url(get_post_thumbnail_id()) ?>"><?php the_post_thumbnail(array(200,150)); ?></a>
and still not yielding the results I am looking for. Even changed the “Link To” field in the admin side of the thumbnail and nothing.
Any help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘linking a the_post_thumbnail() result’ is closed to new replies.