Anastasia Khazova5,640 Points
What function would you use to display the feature image for a post?
Who knows the answer?
I put : the_author_post_link () and it is wrong.
Hi Anastasia, It's:
<?php the_post_thumbnail(); ?>
You can also add a
$size argument inside the parentheses. Those values could be
'thumbnail'. Here is the documentation page (I encourage you to make a habit of checking the WP "Codex" -- their official docs): https://codex.wordpress.org/Function_Reference/the_post_thumbnail_url
That will render the image out as a complete HTML element. If you only wanted to get the image's URL so you can write your own HTML, you'd do that like this:
<img src="<?php the_post_thumbnail_url(); ?>" alt="">
Hope this helps you! Let me know.