Display featured image based on width
-
How to use the featured image´s width in an if statement to set layout class for a single post?
I have been experimenting with has_post_thumbnail and also read about how to check image width using wp_get_attachment_image_src. With more than 100 tabs open and 7 hours of testing I am writing here..
My Setup
I upload very large (in pixles) images and use them as featured images. I use Simple Image Size to create a set of sizes that I use throughout the theme.For single posts I want to check the featured image width somehow and add a class to the one I am displaying.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Display featured image based on width’ is closed to new replies.