I want to show thumbnail pictures of the last posts.
if (is_page('homepage')) { ?>
<?php
global $post;
$myposts = get_posts('numberposts=5');
foreach($myposts as $post) :
?>
<a_href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?>
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
} else { ?>
<img_src="http://www.google.com.tr/intl/en_com/images/srpr/logo1w.png" />
<?php echo get_post_meta($post->ID, "_thumbnail_id", $single = true); ?>
<?php } ?>
<?php endforeach; ?>
Showing results. google picture, post title and _thumnail_id.
but assigned thumbnail image.
