1

I’m looking a way to get embedded video in PHP from WordPress post on a single.php page. I’ve implemented a slider that pulls post attachment images and would like to do the same for video. As the media upload limit in WordPress and practicality of uploading video to CMS are leading me away from using similar method, I need to find a way to get embedded videos.

get_embedded_video() is now depreciated and I cannot find anything else that can replace it. I tried get_attached_media() despite embedded is not clearly attached, and it didn’t work.

Any solution to this problem?

  • I'm also looking for that feature. There's a bunch of snippets out there, but most of them only work for YouTube embeds. Will let you know if I find something interesting. – newpxsn Sep 10 '14 at 18:57
1

I was able to get all the embedded media content within a post using a new WordPress hook (3.6+).

get_media_embedded_in_content();
0

This finally helped me.

Using get_post_custom as decribed in this topic might also be interesting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.