Archived topic
changing post thumbnail problem
4 replies · Started by Streater on July 7, 2021
I've tried everything here and I don't see anyone on the forums with a similar problem... this seems like it should be so simple so I tried everything I could before asking.
I have a Newsroom page that lists all the posts. I tried changing the thumbnail image size with this:
@media only screen and (min-width: 980px){
.page-id-49 .size-auto, .size-full, .size-large, .size-medium, .size-thumbnail{
max-width: 300px!important;
height: 200px!important;
object-fit: cover;
}
}
I had to add the !important or else it didn't work.
THE PROBLEM: The individual post pages now have the smaller sized images too. The page id doesn't seem to be targeting the thumbnails just on the page. I never had to target specific pages before but I found this:
https://generatepress.com/forums/topic/ccs-to-affect-only-one-page/
Am I doing something wrong here?
(links to pages below in private area)
Thanks!
Also, same problem targeting element on just a specific page... I did display flex to put the thumbnail to the left of the title in the Newsroom... but this Flexed things on other pages too.
Hi there,
remove the CSS, its not required.
Then go to Customizer > Layout > Blog --> Featured Images and select an appropriate Media Attachment size for your archives ( Medium will do for 300px wide ), and if need be set the Width and Height to what you require - but you only need to do that if the images are all different heights and you want to normalize them.
https://docs.generatepress.com/article/adjusting-the-featured-images/
It works! Everything you guys do always works perfectly... so many thanks to you and your team!
Awesome - glad to hear that!