I'm making a blog, that has specific html5 structure for img:
<figure>
<img />
<figcaption></figcaption>
</figure>
Is there a way to customize, how the_content() handles img rendering, adding my own template for img specificly (plus adding the_post_thumbnail_caption() template)?
Or is there a way to make your own template for WYSIWYG. I'm asking because i'd like to allow user, to apply one out of three possible img displays, that are bound to specific class of figure element (for example )
Thanks in advance
You could use get_the_content() and then use preg_match to look for the img tag and replace with your own code see how to replace img that with preg_match here https://stackoverflow.com/a/1107203/1287608
and the get_the_content() function here http://codex.wordpress.org/Function_Reference/get_the_content