1

I have added a post with the post format of video and I am trying to get to video so I can display the video in one div and the text in another like

<div>the embedded video</div>
<div>the content</div>

Is there a way in wordpress to do this?

1

Embeds are cached in hidden post meta fields with _oembed_* keys. You could retrieve all of meta (with get_post_custom() for example) and try to get info from it.

However, from quick look at my test data it seems that duplicates are not uncommon there (might have to do with either WP version changes or embed endpoint changes).

If you are not displaying this as "normal" content at all I would consider just adding custom metabox for video and its description.

0

Usually you just include the URL for the video on it's own line at the top of the post, then you add whatever content you'd like below it.

https://www.youtube.com/watch?v=1KkNeN3brMk

<div>The content will follow the video and WordPress will automagically turn the URL into a video embed by using OEmbed.</div>

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.