How to add unique image class to WordPress?
-
I want my in-image ads to appear only on the first long vertical images of my blog posts. I need to add a unique image class to the first images, but I don’t know how to do this or what code to use.
Someone gave me this css code:
jQuery(function($) {
$(“article img:first-of-type”).addClass(“unique”);
});I added it to additional CCS in my WordPress customization.
The blog I need help with is lifeismessyandbrilliant.com.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to add unique image class to WordPress?’ is closed to new replies.