By default, every image uploaded via WordPress Media manager will be uploaded to different sizes. However, when displaying them as featured image, the image need to be re-sized or cropped to get the desired size. This code should go in your functions.php file of your child theme (Yes, I strongly recommend you to use child theme to make any customization to your theme).
Here is the parameter you need to register a new size of featured image:
For more details, see the WordPress codex.
1 2 3 4 5 6 7 |
|
The last parameter, $crop is should be set to TRUE for hard cropping. By default, it return false.
Here are some examples:
1 2 3 4 5 6 7 |
|
Davie says
This is what I needed, and what I was looking for. Thanks a lot.