Adding hover class to excerpt images only
-
Hi there, my site displays the post excerpt if there is one (images and video only), which links to the full content if clicked.
However, I’d like a hover overlay when images in the excerpt are hovered (to display ‘click for more’ text).
Current code is:
<?php if($post->post_excerpt) the_excerpt(); else the_content(); ?>
What code would I need to add to set a class to excerpt images only?
The css I can play with for the hover class, but isolating the images in php is a bit beyond me, and if I add a class in general, it will affect video as well, which I don’t want.
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding hover class to excerpt images only’ is closed to new replies.