Default WP Gallery Styling, Captions Under Thumbnails

Community Forums Forums Design Tips and Tricks Default WP Gallery Styling, Captions Under Thumbnails

This topic is: resolved

This topic contains 1 reply, has 2 voices, and was last updated by  ramseyp 2 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4606


    I’ve set up a default WP gallery on my page here:

    I’d like for the captions to not appear under the thumbnails, but I’m having a hard time determining where this is styled. Is this a Minimum theme thing, a Genesis thing, or a WordPress thing.

    And yes Andrea, I used the code inspector to see the gallery_caption code, but I can’t find that in my stylesheet for the theme anywhere. :)

    For the record, I just upgraded to WP 3.5 today as well. And I gotta say, the WP Codex is really ambiguous about the default galleries, focusing more on plugins – at least what I found.


    Dad. Biker. Designer. | | Circle me on Google+, and say hi so I can add you to my WordPress circle!




    WordPress’s post galleries output as an HTML Definition List. Each image is a DT element (tag) and the caption is a DD element, which comes after the DT. To change this, you’ll want to insert your gallery on the page / post, switch to HTML view, and then edit the gallery shortcode you’ll see there.

    The reference for this is here, in the WordPress Codex: Gallery Shortcode. Scroll down to the line that reads, “Some advanced options are:”

    You can change the tags for each gallery item, the image, and the captions. For example (without the dash and the space next to each square-bracket):
    [- gallery itemtag="div" icontag="span" captiontag="p" -]

    That would output the gallery as a series of divs, with the image in a span tag and each caption in a paragraph tag. Depending on how you want to design your gallery will determine the correct HTML and then the necessary CSS.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.