Resize thumbnail/ featured image for specific custom post type
-
I have created a custom post type for Team members and I have set an archive for it as well.
Once I create a post for a team member, I can upload his image into featured image which would show both on the archive page and post page of this specific custom post type.
However, I need to have specific size for the uploaded featured image to display on both pages, so I need a resize image function. (currently it is resizing them to the default size of 150×150 and I need this for my regular posts)
How can I code that in function.php or even better in my archive-team.php and single-team.php? both pages can have the same size image. I will add more custom post types and they have different image sizes. So it has to be specific to each custom post type.
The size I need say is 300x170px.
I have read many tutorials for this but none works and most of the time I get a white page screen! So I must not connecting the dots correctly!
Any detailed help is appreciated ??
- The topic ‘Resize thumbnail/ featured image for specific custom post type’ is closed to new replies.