I created a mini "blog feed" for the front page of my clients website. I want to be able to truncate each of the posts and add a "read more" link the end. Easy enough job, accept each blog post may or may not contain 'IMG' (auto resized) and 'EMBED' (youtube vids) tags and I want to ensure the string is NOT broken on those tags or it will display an empty link.
So my question is, what would be the best way to tackle the problem?
There is a little bit of regular expression further down the page. Look in to that too. Powerful stuff
You’ll need that if you want to show some HTML but only whole tags.
hey! funny enough I went with strip_tags in the end. Then I opted to prepend a video or image onto the string with the title "attached media! - seems to work nice