I am trying to understand how to add a class to a set of images in WordPress. Specifically I am trying to add a class, for example, .no-lazy-load
, to exclude those images from being lazy loaded via the a3 Lazy Load plugin. The set is a series of 6 images within a Slick slideshow, and they have no other class or id (other than the .lazy-loaded
class added by the plugin) when the html is rendered.
I'm using the Jevelin theme with the Classic Editor plugin and don't see an option to add a class to an image via Advanced Options. In fact I don't see the Advanced options for editing the image at all.
I was thinking about using something like this but don't know how to add this hook to that set of images instead of all images in the DOM. For example, can I create an array of attachment IDs using wp_get_attachment_image
and apply the hook to only those?
I'm not very well-versed in WordPress and apologize if this is an overly broad question. Any help or getting pointed in the right direction would be very much appreciated!
the_content
.