You may want to remove the “paragraph” tags from the excerpt in your loop. This is useful particularly for the purpose of wrapping each excerpt with a span element. HTML paragraph tags are not valid within span tags. It’s easy to get just the excerpt text, without any HTML tags. You do not have to strip any html tags. Just call this excerpt like this:
echo get_the_excerpt();
This simply returns the text without any HTML.
tobiv
October 24th, 2016 at 3:30 pm
I realize this is old, but just saved me a couple of minutes 🙂
thanks