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

I've set up my loop-attachment.php to show the gallery of thumbnails above the main, selected image using this code from the WordPress Codex:

    $gallery_shortcode = '[gallery id="' . intval( $post->post_parent ) . '" size="mini-thumbnail" columns="10"]';
    print apply_filters( 'the_content', $gallery_shortcode );

However, if the image has a caption, it shows up underneath its image, throwing off my neat little grid of images. I don't want to turn captions completely off or not use them at all, because after the grid and below the main 960x540 image, I want to do an "Image Summary" kind of section, with the filename, original size, caption, description, etc.

Is there a way to turn off captions in the above code? The gallery shortcode section of the WordPress Codex doesn't have anything on it.

share|improve this question
up vote 1 down vote accepted

you can always just set a css tag display:none to the caption element

share|improve this answer
Yep, I'm an idiot lol. Works just fine. For those wondering, you can just display:none on the "wp-caption-text" OR "gallery-caption" classes. Thanks! – Chris May 31 '11 at 7:25

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.