Remove unwanted br tags from WordPress image gallery output.


   by Tomasz Kucharski    Leave a comment  →
' . get_the_title() . '
Unwanted empty space under each row of gallery images can be really annoying, if you love pixel-perfect layouts, you may have noticed this issue while adding WordPress Image Galleries.


I’ve tested few different fixes and finally I’ve found working code snipped which is removing unwanted br
tags from WordPress image gallery output.
Below code snippet will help you to remove unwanted br tags from WordPress image galleries. Add this snippet in to functions.php file in your theme folder.
There is also a bit of css which can be added to style.css in your theme folder to make the fix even better.
Remove unwanted br tags from WordPress image gallery output. by