// --------------------------------------------// Display thumbnail image for a post if it // was set in the admin. Use this inside the// loop. //// Requires that a meta field be set with// name 'post-thumbnail' and a value that is// the url of an image. //// use display_meta_thumbnail() in the loop.// --------------------------------------------//function display_meta_thumbnail() { global $post; $thumbnail = get_post_meta($post->ID, 'post-thumbnail', TRUE); if ($thumbnail) { echo '<a href="'.$post->guid.'">'; echo '<img class="post-thumbnail" alt="Thumbnail for this post" src="'.$thumbnail.'" />'; echo '</a>'; }}