All pastes #848556 Raw Edit

meta thumbnail function for word

public php v1 · immutable
#848556 ·published 2008-01-09 20:35 UTC
rendered paste body
// --------------------------------------------// 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>';	}}