Cropping featured image
-
Hello WordPress people,
I am having a real problem with cropping my featured images to the size that I require.
I have a static homepage that shows my three most recent posts.
I have uploaded images for each post and their dimensions are 480 x 480 px. That is the size I want to display the images in the post. In the post excerpt on the homepage, I want the images to be cropped to 400 x 260 px.
I have tried to achieve this using plugins like ‘Post Thumbnail Editor’ and ‘Crop Thumbnails’ but haven’t found a way to make this work. I have tried cropping both the ‘thumbnail’ and the ‘post-thumbnail’ but neither has any effect.
I have also tried editing the functions.php file by adding the following code:
add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 400, 260, true );
I have spent hours on this but still the featured image in the excerpt on the homepage displays as a square image, 480 x 480 px.
I would really appreciate any suggestions as to what I’m doing wrong.
Thanks.
- The topic ‘Cropping featured image’ is closed to new replies.