Categories

Retrieve the thumbnail image

Using the_post_thumbnail() you can retrieve different sizes of the post featured image. It is important to enable post image by adding add_theme_support() to your them functions.php file.

<?php require('wp-blog-header.php'); ?>
<?php define('WP_USE_THEMES', false); wp_head(); ?>
<?php $posts = get_posts();?>
<?php foreach ($posts as $post) : start_wp(); ?>
	<h1 id="<?=the_ID();?>"><?=the_title();?></h1>
	<?php the_post_thumbnail('thumbnail'); ?>
	<hr/>
<?php endforeach;?>

Learn more

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

IMPORTANT! To be able to proceed, you need to solve the following simple math (so I know that you are a human) :-)

What is 6 + 11 ?
Please leave these two fields as-is: