Filed under “php”

Adding class to WordPress linked images

An enduring issue with linked images (<a href=""><img src="" /></a>), is targeting the anchor link for theming—especially for disabling borders and highlighting that look great on text links but odd for images. CSS doesn’t have a parent selector ( a > img:parent), and javascript feels like overkill. The simple solution is to add a class […]