WIE Blog

Summer 2015

flowers
When we first began setting up this blog, our thumbnail size was set by keywords already decided by WordPress.  These flowers were not fitting how I wanted them to fit on my homepage according to my wireframe and mockup.  We went over changing that keyword for some different sizes, but what if I needed a very specific custom size?  I found this blog post by Sarah Gooding to describe the steps needed to do this. I also referenced the WordPress Codex for set_post_thumbnail_size. I tried this out by creating a ‘newsize’ which you can see in my functions page.

add_image_size('newsize', 610, 300, true);

However this was still causing me some trouble when trying to make the images responsive so I went about this a different way. I set the size back to ‘large’, correctly sized my images in illustrator and then used the css to keep the width at 100% and the height at auto. This worked!

.post-thumbnail-container img {
display: block;
margin: 0 auto;
width:100%;
height: auto;
}

From:

Sizing up your thumbnails

© Copyright

2015