On my page I've inserted some simple HTML via the text editor:
<div class="box box-tv">
<img class="logo-ma" src="http://kabultec.org/dev/wp-content/uploads/2017/07/logo-nbc.svg"/>
<img class="logo-ma" src="http://kabultec.org/dev/wp-content/uploads/2017/07/logo-nbc.svg"/>
<div class="logo-ma"></div>
<div class="logo-ma"></div>
</div>
But when I view the front-end source code, an extra </p>
appears after the second <img>
(screenshot). How can I determine the cause of this </p>
?
I have searched my source code for a potential opening
<p>
tag that I forgot to close, but none exists.I have also tried disabling auto-insertion of
<br>
and<p>
tags, by adding code to functions.php.add_action('spacious_before_body_content', 'nobrp'); function nobrp() { if (is_page('232')) { remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); function wpse_wpautop_nobr( $content ) { return wpautop( $content, false ); } add_filter( 'the_content', 'wpse_wpautop_nobr' ); add_filter( 'the_excerpt', 'wpse_wpautop_nobr' ); } }
I also added code to remove
<p>
tags around<img>
tags (see here). But that did not resolve my issue either.
The motivation for removing the </p>
is that I plan to add more images to this page, inside a flex container, so they are laid out a specific way on the page. The extra </p>
is causing elements to not align as expected.
Workarounds are appreciated, but if possible, I am most interested in determining the cause of this issue.
Thanks.