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'm sorry if this question was answered here, but I couldn't find it. Is possible to change the HTML output of [gallery] shortcode (without plugins)? I would like to show the thumbnails as another appearance. Is this possible? Thanks!

share|improve this question
Have you seen this? – toscho Mar 18 '13 at 22:28

The source for the gallery shortcode is in wp-includes/media.php. There are a couple of hooks in there that might work for you. Without knowing exactly what you want to do, it is impossible to be more specific.

If that doesn't work then you can remove the shortcode:


And add another gallery shortcode with the alterations you want. Just copy the function to functions.php or to a plugin file, rename it, edit it, and add it back with add_shortcode('gallery', 'whatever_you_named_your_function');

share|improve this answer
Great! It works for me. – gregolin Mar 25 '13 at 21:03
If this solved the question please mark it as "Accepted". Look for the check mark on the left. – s_ha_dum Jun 24 '13 at 15:01

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.