WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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">

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

<ul class="gallery-item">
        <img title="then my image" src="foo.jpg">
share|improve this question
I found how to change default <dl> and <dt> using [gallery itemtag="div" icontag="span"] but not how to remove it. – rooofl Jun 18 '11 at 9:59
There's several related questions shown to the right(under the "Related" heading) that would of provided ample solutions to this question, just an FYI. – t31os Jun 19 '11 at 10:01

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.

share|improve this answer
Sadly there's really no better way to do this... – kaiser Jun 18 '11 at 14:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.