WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Image Container (2 posts)

  1. clawler
    Member
    Posted 3 years ago #

    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

  2. markimark
    Member
    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic