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 WordPress developer working at Automattic (the makers of Based in Vancouver, BC, Canada, I am easily distracted and very curious.