[wp-hackers] oembed with custom fields

Drew xoodrew at gmail.com
Sun Sep 30 16:10:45 UTC 2012


Chris,

I had the same problem you did. It finally came down to running the field
through html_entity_decode() in the 'the_content' filter.

Shorthand:
echo apply_filters( 'the_content', html_entity_decode( $videourl ) );

Drew


> Message: 5
> Date: Sat, 29 Sep 2012 22:52:47 -0400
> From: "Chris McCoy" <chris at lod.com>
> Subject: [wp-hackers] oembed with custom fields
> To: <wp-hackers at lists.automattic.com>
> Message-ID: <000601cd9eb6$ac6e7910$054b6b30$@lod.com>
> Content-Type: text/plain;       charset="us-ascii"
>
> Is it possible to use oembed with custom fields?
>
> Ive tried using wp_oembed_get with the custom field value, but nothing
> seems
> to show.
>
> Example
> $videourl = get_post_meta(get_the_ID(), 'video-link', true);
> echo wp_oembed_get( $videourl);
>
> video-link has the youtube url.
>
>


More information about the wp-hackers mailing list