Adding a class to certain featured images
-
Hello Experts,
I am new to WP Development and am trying to accomplish something: I would like to add a particular CSS class only to certain featured images.
Specifically, if a featured image is above a certain dimension (say 1000×1000), then I would like to add the css class “full” to it. Ideally, I would like to have the option of manually choosing to add the class or not (but also curious how one would automate this).
How can I go about achieving this?
Thanks!
- The topic ‘Adding a class to certain featured images’ is closed to new replies.