Make a really simple gallery structure

The default gallery structure of WordPress is really tortuous:

<div id="gallery-1" class="gallery...">
    <dl class="gallery-item">
        <dt class="gallery-icon">
            <a title="01Exam" href="bar">
                <img title="then my image" src="foo.jpg">
            </a>
        </dt>
    </dl>
</div>

Can you help me to output a simple list of images just like:

<ul class="gallery-item">
    <li>
        <img title="then my image" src="foo.jpg">
    <li>
</ul>

Related posts

Leave a Reply

1 comment

  1. Use your own gallery shortcode handler – something like this in your functions.php:

    function __my_gallery_shortcode( $attr )
    {
         // render the gallery the way you want it
    }
    add_shortcode( 'gallery', '__my_gallery_shortcode' );
    

    To get you started, you could just copy the code from the default handler gallery_shortcode(), and edit as you require.