Make Featured Image Thumbnails all the same size on Blog Page


#1

Hi,

Cheers guys for your help so far.

I just updated my theme from Sydney to Sydney Pro and added a Sydney Pro Child. With all the changes, the featured image thumbnails have changed size on the posts page. I have a masonry layout. This is also the case with the categories and archives. However the ‘Latest News’ has become great as it now stays in a container so that if the excerpt is a different length the photos all line up.

Here is an example of the different featured image size- http://www.where2wander.com/blog/
Here is an example of the latest news widget working well- http://www.where2wander.com

So what i would like is for the featured images that are used on the blog, categories and archives to all be cropped/adjusted to the same size. Preferrably i would love them to stay in a container just like the ‘latest news’ widget as the excerpt length also adjusts where it lies on the page.

I have searched through all the forums and can’t find exactly what i need. I have tried writing in a code into functions.php and used a regenerate plugin to no avail. Can you please advise me what code i need to put in and where?

Thanks so much!

Cheers
Caleb


#2

Dear Caleb,

It looks like to relate with this https://athemes.com/forums/topic/problem-aligning-blog-posts/#post-542944. Please let me know how it works for you.

Regards,
Kharis


#3

Hi Kharis,

Cheers for that, it worked great to keep them in line.

What code can i use to keep all thumbnails the same size as they are in the latest news A widget?

Thanks again
Caleb


#4

It happens because the thumbnail size of blog archive page uses large-thumb thumbnail size. In the theme’s functions, its size is defined as seen below:


add_image_size('large-thumb', 830);

Meaning that any image larget than 830px will be cropped by 830px width and the height will follow proportionally. Due to your image size are varies, they look unequal.

To change this situation to be like the latest news widget, you should edit the content.php file in child theme mode. Replace this line:


<?php the_post_thumbnail('large-thumb'); ?>

with:


<?php the_post_thumbnail('medium-thumb'); ?>

Regards,
Kharis


#5

Hi Kharis,

Thank you very much. All fixed, looks fantastic!

Btw to anyone else who may be interested, I changed the above code from

<?php the_post_thumbnail(‘sydney-medium-thumb’); ?>

to not using sydney as it didn’t work when i added it in.

<?php the_post_thumbnail(‘medium-thumb’); ?>

Again, thanks Kharis!
Caleb