Different featured image style for portfolio

Hi, how can I get portfolio featured images to display differently than post featured images? They both seem to have the same selector " .entry-thumb img {min-width: 100%; }

I want portfolio featured images to be the full width, but on posts, I don’t want featured images to show at all. I did the hack of eliminating featured images completely but I want them to show up in the Recent Posts feed and a feed on the home page. I know I can do css on each page, but I want a universal hack. Why do portfolio and posts have same selector???

Latest post needs to show up on home page so featured is used:https://homefiresprinkler.org/

See portfolio pages here: https://homefiresprinkler.org/portfolio/see-how-fast-a-fire-becomes-deadly/

and a post here: https://homefiresprinkler.org/oregon-deputy-fire-marshal-receives-national-award-for-home-fire-sprinkler-advocacy/

The post images are not very high quality so I don’t want them showing so large. Portfolio images are social media posts and we do want them large because they are high quality images.

Thank-you.

Hi @mclukens,

Thank you for reaching out to us. You can style the featured images of portfolio and blog posts differently by using their body class.

For example, to hide featured images on blog posts, you can use the following code:

.single-post .entry-thumb img { display: none; }

For portfolio posts, you can use the following code:

.single-x-portfolio .entry-thumb img { min-width: 100%; }

Here are some related links for further reading, this could help you in finding and implementing some CSS fixes:

Hope this helps!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.