Display thumbnail of a post in wordpress website

42 views
asked May 22, 2012 in Website Builder by SaraSX (2,770 points)
hi
I have the following code displaying the content of a page:
<?php
$post_id = 50;
$my_post = get_post($post_id);
echo "$my_post->post_content";
 ?>
I want to display the thumbnail of that page. Can someone please let me know how can this be done?
thanks

1 Answer

0 like 0 dislike
answered May 22, 2012 by lightSpeed (2,420 points)
...