Changing HTML markup for WordPress galleries

The default markup for WordPress galleries is a little… odd. If you want to change it, the post_gallery filter is what you’re looking for; see wp-includes/media.php around line 671 for the goods.

Published by

Kirk Wight

I am a Code Wrangler at Automattic, helping make WordPress.com the best it can be. Pender Island, British Columbia, Canada is where I call home. Lover, not a fighter.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s