Home › Forums › Back End › [WORDPRESS] Display thumbnail and link to full image attachment › Reply To: [WORDPRESS] Display thumbnail and link to full image attachment
December 18, 2013 at 12:36 pm
#158631
asiek
Participant
So I found a solution.
At first I wasn’t able to get a featured image metabox working…
But I found a way and got it working in the end.
So I used this in my template//
<?php
if ( has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
the_post_thumbnail('thumbnail');
echo '</a>';
}
?>
&that did the trick :)