The Content is not Wraping in tag
The function the_content() prints the content with a p tag itself. I mean, if you use echo ‘<p class=”our_p”>’ . the_content() . ‘</p>; It actually outputs- <p class=”our_p”><p>lorem ipsum dolor sit amet…</p></p> Use get_the_content() instead. It will return the unfiltered content. Something link this- echo ‘<p class=”our_p”>’ . get_the_content() . ‘</p>; Codex: https://codex.wordpress.org/Function_Reference/the_content