WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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

This finally helped me.

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

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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