Styling image captions differently on pages and blogs
-
Hi guys.
I’d like to have captions under images on my pages appear in one font, and captions under images in my blog in another.
The code that WordPress spits out looks like this:
<div id="attachment_1098" class="wp-caption alignright" style="width: 384px"> <img class="size-full wp-image-1098" width="374" height="300" alt="" src="image" title="shrug-yellow"> <p class="wp-caption-text">Caption Text</p> </div>
I thought for pages I could just throw a different span into the caption text, but when I come to edit the page it looks like this:
[caption id="attachment_1098" align="alignright" width="374" caption="Caption Text"]<img class="size-full wp-image-1098" title=image src="image" width="374" height="300" />[/caption]
So it uses some WordPress square brackets cleverness in the input, and throwing spans into any of that breaks it.
Any thoughts much appreciated, thanks.
[Moderator Note: Please post code or markup snippets between backticks or use the code button.]
- The topic ‘Styling image captions differently on pages and blogs’ is closed to new replies.