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: (visible only to logged in users)
-
It looks like the site you need help with is a self-hosted site that is built on WordPress.org. This forum is for help with WordPress.com. You can read about the differences between the two here: http://en.support.wordpress.com/com-vs-org/
WordPress.org has its own support forum at https://wordpress.org/support/ where you’ll have better luck getting your issue resolved.
-
@jeffinner07, there is a Sela theme support forum at WordPress.org for self-hosted users of that theme. That code will require a child theme and then modifications to some of the theme php script files. They will be able to help you with that at WordPress.org.
- The topic ‘How to add unique image class to WordPress?’ is closed to new replies.