Line Breaks being inserted into tags

Really strange - I inserted the following image/text into a page:
ChrisB
<h2>Chris Bruckner, L.Ac, MSOM</h2>)

And when it renders I see:
<p>ChrisB<br />
<h2>Chris Bruckner, L.Ac, MSOM</h2>

The <p> tags don’t really bother me, but that extra line-break is making it difficult to align elements on the page(s) -

thanks for any help!

-Z

Hello Z,

Can you please try to manually remove wrapping and leave only <img> element in Text tab of Editor?

Kind Regards, Roman.

Thanks for your help on this, Roman.
Played around some more with this, and although I don’t have a solution I have at least isolated the issue.

If I just leave plain text and the image, no <br> tag is added by the editor. However as soon as I put the <h2> tag back in - we get the line break added again.

I did however find a workaround - for fun I tried including the image inside of the <h2> tags and the page renders properly.

I also tried the same code with different themes and found the same behaviour - so I can confirm it’s a wordpress editor issue - not something specific to your theme. (Not that there was any doubt!)

Thanks again for your help on this - strange that I’d never seen it before. You may consider this closed :slight_smile:

regards,

-Z

Okay, it’s great that you have isolated the issue!

Please feel free to ask any other questions that you might have in future.

Kind Regards, Roman.