strip_tags() is not working on the_excerpt()
I’m trying to use the_excerpt() function to create a meta description tag based on each post.
The problem is that the_exceprt() wraps the content in
<p></p>and also includes any other html formatting added to the post.
I tried using the php strip_tags() function to remove the tags, but it doesn’t seem to be working.
<meta name=”Description” content=”<?php strip_tags(the_excerpt()); ?>” />
Does anyone have any idea how I can get this to work?
- The topic ‘strip_tags() is not working on the_excerpt()’ is closed to new replies.