Some of our blog posts are Infographics in which we use a featured image (for RSS feed reasons) as well as the actual infographic itself on the blog post and excerpt. When we have the image tag in the Excerpt it seems to break the layout for our masonry grid.
Is there an easy way to make the masonry grid display the excerpt image as the featured image for posts with the Infographic category? or any way to display the infographic image without it breaking the layout?
Hey CharlotteKCM,
The excerpt is not really meant to have anything but text in it, what code are you using?
Best regards,
Rikard
For our infographics posts the excerpt normally just contains the image tag.
Is there a way to hook into a function for the masonry grid and switch the featured image element with the image from the excerpt for posts that have the Infographic category?
EDIT —
I did see our excerpts had the img tags wrapped in a tags. It looks like the a was throwing off the sizes so removing that allows the infographic to show fine. So now the question would be is there a way to turn off the featured image section of the masony items for blog posts with a specific category? I’ll try digging through the code to see what I can find but if anyone already knows how that’d be a huge time saver
EDIT 2 —
Solved this, was able to use a simple css rule to hide the featured image section for posts with that category class