I have a thumbnail of the featured image, which is linked to a larger version of the file. At the moment the file just opens in a standard browser window, but I would like it to open in an attachment page, but I can't figure out how to do it! Here is what I have at the moment:
<?php if ( has_post_thumbnail()) : ?> <div class="spudpictureandcontentwrapper"> <div class="illustration"> <?php $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); echo '<a href="' . $large_image_url . '" title="' . the_title_attribute('echo=0') . '" >'; the_post_thumbnail('thumbnail'); ?> </a></div> <?php endif; ?>
I'm guessing I need to use a different function to pass a value to $large_image_url but can't work out which one.