- This topic has 13 replies, 3 voices, and was last updated 4 years, 1 month ago by David.
-
AuthorPosts
-
July 28, 2020 at 11:08 am #1379599Courtney
My homepage is set to my latest posts. I’d like to have the most recent post look different than the others e.g. have a larger image centered above the excerpt text.
How can I do this? Thanks!
July 28, 2020 at 3:11 pm #1379775TomLead DeveloperLead DeveloperHi there,
It’s easy to force the feature image up above:
.post-image-aligned-left article:first-child .inside-article .post-image { float: none; margin: 0 0 2em; }
However, the issue comes with the featured image size. How are you sizing them right now?
July 28, 2020 at 9:10 pm #1379954CourtneyThanks!
I’m not really sizing them, I’ve just been ensuring that they’re square. What’s the best way to properly size them?
July 29, 2020 at 4:35 am #1380354DavidStaffCustomer SupportHi there,
add Toms code and add this code:
.post-image-aligned-left article:first-child .inside-article .post-image img { width: 100%; }
July 29, 2020 at 2:53 pm #1381143CourtneyThe code worked – thanks!
Any recommendations for a way to properly size feature photos?
July 29, 2020 at 4:20 pm #1381186DavidStaffCustomer SupportThere are no specific rules for featured image sizes. It really depends on the design.
As you’re only displaying featured images in your archive and the square images work for your design, then this is probably the best method.If you were adding them to your single posts then you may want to create wider landscape images around 800px wide. We could then assist with setting the archive images to the current square size.
July 29, 2020 at 4:52 pm #1381199CourtneyThe images are also in single posts. I either have to use a square photo in the single post or upload 2 versions of the photo (landscape, square) and use the square for the feature image. Is there a way to have a landscape image be automatically squared for the archive? In the beginning, I had archive images of different shapes and it looked bad.
Also, the CSS code provided works but the photo quality is low, even though the photos in my media library are high quality. Any idea about how to improve the photo quality? I don’t mind shrinking the photo if it means the quality is higher.
Thank you!
July 30, 2020 at 3:21 am #1381595DavidStaffCustomer SupportIf you upload an original featured image as landscape around 800px wide for the latest couple of posts. You can use that for the single post and the archive featured post.
I can provide some CSS to change the other archive images to square. The weigh off however is you’re site will be loading a larger image then is required for your post archive. This can be detrimental to performance. Let me know
August 2, 2020 at 1:00 pm #1385044CourtneyI used an 800 pixel wide version of the pic in the post and for the featured image and it still looks pretty bad.
August 3, 2020 at 1:11 am #1385374DavidStaffCustomer SupportYes, you would have to remove the Width and the Height dimesntions from the Customizer > Layout > Blog –> Featured Images >>> Posts
With that change made i can provide some CSS to change the over the post images to their smaller square size.
August 4, 2020 at 11:26 am #1387288CourtneyThat worked, thanks! I’ll gladly take the CSS.
August 4, 2020 at 1:09 pm #1387399DavidStaffCustomer SupportTry adding this CSS:
@media(min-width: 769px) { body:not(.single) .post:not(:first-of-type) .post-image img { max-width: 250px; } }
August 4, 2020 at 2:55 pm #1387510CourtneyThank you for all of your help – it looks great!
August 5, 2020 at 1:07 am #1387842DavidStaffCustomer SupportGlad to be of help
-
AuthorPosts
- You must be logged in to reply to this topic.