dimanche 29 mars 2015

Display featured image as thumbnail?

I am currently trying to display a post to my homepage from a category, along with an image (featured image).


so far, I have this code which grabs the post and displays it on my homepage:



<div class="row">
<div class="col-md-6">
<?php query_posts('cat=4');
while (have_posts()) : the_post();
the_content();
endwhile;?>
</div>


This does display, but I have now attempted to set a featured image aswell.


I would like it to display like:


Post and thumbnail?


I have seen some suggestions such as


<?php the_post_thumbnail(); ?> but i'm not 100% where to add this.


Super thanks in advance!


Aucun commentaire:

Enregistrer un commentaire