As the title suggest, I am looking for other methods/ways on displaying my featured images in my homepage or index.php.
I’ve already tried using:
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 150, 150, true ); // Normal post thumbnails
add_image_size( 'featured-thumbnail', 60, 60 ); // Featured thumbnail size
but it’s not cooperating with me, It doesnt follow my assigned size and it doesnt crop the image. I’ve been stuck here for days.
Do you have any other methods to suggest to display the featured image? Thank you very much and have a great day!
Those lines of code you posted just setup your theme for supporting featured images, they won’t actually display the images.
To display images, you need to use
the_post_thumbnail('featured-thumbnail')or a similar function.You should also know that
add_image_sizecode you have also sets up dimensions for newly uploaded images, not images that have been previously uploaded.This is a common issue, and many people use some kind of resizing plugin to resize existing media when adding new image sizes.