Stripping images from post teasers/excerpts in Wordpress

Posted by Tom J Nowell on Stack Overflow See other posts from Stack Overflow or by Tom J Nowell
Published on 2010-01-31T20:15:53Z Indexed on 2010/03/08 0:52 UTC
Read the original article Hit count: 455

Filed under:
|
|
|

In my theme I'm trying to display the excerpts or teasers of child pages, yet I do not want to display any images, I want image tags stripped out.

Once I've gotten the teaser in all its html glory in a php variable, how do I strip out the img tags prior to using echo?

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about wordpress-theming