wordpress adding br & p tags to gallery output
-
Hello,
I’m using nextgen gallery on a new theme that has a bit more of a specific layout requirement for their gallery and have run into a bit of an annoying bug / issue.
In the ‘gallery.php’ output for a page, wordpress is adding a bunch of br and p tags throughout the output of gallery.php’s template.
I tried removing the wpautop filters in the theme’s functions file, like so:
remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' );
but the gallery output remains the same.
Basically I’m getting this in the output of gallery.php:
<div class="ngg-galleryoverview" id="ngg-gallery-2-222"> <div id="ngg-image-6" class="ngg-gallery-thumbnail-box"> <div class="ngg-gallery-thumbnail"> <a href="/path/to/my/gallery/name/1.jpg" title=" " rel="lightbox[set_2]"><br /> <img title="image title" alt="image title" src="/path/to/my/image/thumbs/thumbs_1.jpg" height="74" width="115"></a><br /> </div> <p></p></div>
and so on for each thumbnail.
Basically after the link ‘a’ tag and after the ‘img’ tag, I’m getting unwanted / unnecessary BR tags, and then a separate ‘p’ tag at the end.
Is there any way to remove / prevent wordpress from modifying the output of the gallery and stop doing this?
- The topic ‘wordpress adding br & p tags to gallery output’ is closed to new replies.