Title: Custom Post Image Container
Last modified: August 20, 2016

---

# Custom Post Image Container

 *  [clawler](https://wordpress.org/support/users/clawler/)
 * (@clawler)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/custom-post-image-container/)
 * Hello,
 * I’ve done a good deal of searching and have not been able to find much on this
   solution.
 * How can I customize the containers for the images I post (not the featured images
   and I’m not talking manually every time either)?
 * Images without captions result in (bare bones tags to explain my question better):
   `
   <p><a><img class="size-image" /><a/></p>`
 * Images with captions result in:
    `<div><a><img class="size-image" /></a><p>caption
   </p></div>`
 * What I’d like to customize mine as:
    `<figure class="size-image"><a><img /><figcaption
   >caption</figcaption></a></figure>`
 * With figcaption being dependent upon whether or not there is a caption. Honestly,
   I’d prefer to be able to customize it to whatever I wish and am surprised there
   isn’t already a function that allows you to do so (if there is one please pardon
   my ignorance and kindly point me in the right direction).
 * This problem has really been stumping me, I would appreciate any and all suggestions
   and/or advice you might have.
 * Thank you in advance,
    C. Lawler

Viewing 1 replies (of 1 total)

 *  [markimark](https://wordpress.org/support/users/markimark/)
 * (@markimark)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/custom-post-image-container/#post-2301001)
 * Hi there,
 * did you ever found out to achieve this? I want to modify those img container,
   too.
 * Maybe you can help me.
 * Cheers
    Mark

Viewing 1 replies (of 1 total)

The topic ‘Custom Post Image Container’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [markimark](https://wordpress.org/support/users/markimark/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/custom-post-image-container/#post-2301001)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
