the_content() is surrounded by <p> tags
-
I am using <?php the_content(); ?> to display a blog post, and I am trying to surround it in <h6> tags, but the content is already surrounded in <p> tags, to I end up with
<h6><p>The content is here....</p></h6>
Do I just need to manually cut the tags out or is there a better way?
$mycontent = the_content();
$mycontent = substr( $mycontent, 3, -4);(that doesn’t work, btw)
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘the_content() is surrounded by <p> tags’ is closed to new replies.