How to add featured image to posts listing page?
-
Hi,
We have a blog post page currently listing all the blog posts here –
We would like to display the respective featured image in each blog post listed on that page. After researching online, I know I need to add the following code:
<?php the_post_thumbnail(); ?>
into the template file codes below:
function the_content( $more_link_text = null, $strip_teaser = false) { $content = get_the_content( $more_link_text, $strip_teaser ); /** * Filters the post content. * * @since 0.71 * * @param string $content Content of the current post. */ $content = apply_filters( 'the_content', $content ); $content = str_replace( ']]>', ']]>', $content ); echo $content; }
But I have no idea where exactly should the above code be added… I would appreciate if someone can enlighten me, thank you very much!
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to add featured image to posts listing page?’ is closed to new replies.