Tag Info

New answers tagged


Assuming your content is in the variable $content you would begin by removing all html tags using wp_strip_all_tags: $new_content = wp_strip_all_tags( $content ); Then you will want to trim that to 200 characters using substr: $new_content = substr( $new_content, 0, 200 ); To retrieve the YouTube video, you'll need to use preg_match: preg_match( ...

Top 50 recent answers are included