I have a post with YouTube video in it. The content is inside
$content. Currently I am doing
the_content() and this displays full content on my page. The page contains the list of all videos. The problem is that sometimes the full content is too large to display in this list. So I want to limit the text in the content, but then still want show the first video:
I want to
- get text: take first 200 characters from the content, but without including video
- get video: take just video link and show YouTube video under the text
I am not sure how to archive this. Probably, I would have to use some Regexp and probably I can invent the wheel by my self, but I believe that there should be something already done in WordPress. As I am quite new in WP, I have not found anything yet.