I'm developing a theme and while working on the featured images area I've noticed they aren't cropping even though I've set them to crop through set_post_thumbnail_size function.
/* Featured Image Thumbnails */
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 460, 250, true);
Using xampp, phpinfo says GD is supported. I've cleared the thumbnails and regenerated them to no avail. The div that the featured image is in is also set to 460, 250. The image just scales down to 460 wide by whatever heigh and constrains its proportions.
An imag showing the output: https://i.sstatic.net/zz6Rv.png
set_post_thumbnail_size()
should setpost-thumbnail
to your desired dimensions, and thenthe_post_thumbnail()
should usepost-thumbnail
as it's default size, if none is passed.