Hey There,
The documentation is your friend, I learned this the hard way.
https://codex.ww.wp.xz.cn/Function_Reference/the_post_thumbnail
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail(
array(
'src' => $src,
'class' => "attachment-$size",
'alt' => trim( strip_tags( $wp_postmeta->_wp_attachment_image_alt ) ),
'title' => trim( strip_tags( $attachment->post_title ) )
)
);
}
?>
I am sorry, but I insert this bit of code where?
I am more of a writer than a coder, but can insert the code once i know where
@theyoungbigmouth – the posts on the home page all appear to have images above the titles. Is there another problem you’re referring to?
It all depends on where you are putting the image.
– If it is on an archive page then probably archive.php
– If on a single post then single.php
– If on a template then search files for Template Name: