The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Page-class specific img tag Re: Page-class specific img tag


Something like

<?php if (body_class(‘singleclass’)) { ?>
<img class=" xyz " />

<?php if (body_class(‘singleclass’)) { ?>
<img class=" abc " />

<?php } ?>

Would that work? (forgive my Dreadful effort at PHP, i can barely spell it, let alone write it!) I hadn’t thought about it – was going to do it through css, PHP didn’t even occur to me.