As you know the result of the the_post_thumbnail()
is an image tag. I need this image tag to store at a kind of collection or Array. I'm using the following code but it doesn't help me out. And I want to use it at another place and print out as an image tag.
<?php $tmp_query = new WP_Query('showposts=6');
$counter=0;
while ( $tmp_query->have_posts() ) : $tmp_query->the_post();
$arr[$counter]=the_post_thumbnail();
$counter++;
<?php endwhile;wp_reset_query(); ?>
showposts
is deprecated useposts_per_page
instead