I am working on my first WordPress theme using underscores, I have already added the ‘featured post’ code in the functions. Php and called it from the ‘loop’ in the ‘single. Php. But I ended up getting featured images only when I view a post, and not on the homepage, I will appreciate if someone can help me with this. Thanks!
This is in my functions.php file
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 590, 180); // 590 pixels wide by 180 pixels tall, resize mode
this is the code in my single.php
<?php while ( have_posts() ) : the_post(); if( has_post_thumbnail() ):
echo get_the_post_thumbnail(); endif;
Sorry, it’s my first time here…
Read more here: Featured post showing in posts but not on homepage