[wp-hackers] oembed with custom fields

Chris McCoy chris at lod.com
Sun Sep 30 18:56:46 UTC 2012

What happens if you are not using the_content though? also I should note im
have some oembeds that I registered handler ex wp_embed_register_handler
that are not your oembeds registered with wp or the site.

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Drew
Sent: Sunday, September 30, 2012 12:11 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] oembed with custom fields


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

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


> 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.
wp-hackers mailing list
wp-hackers at lists.automattic.com

More information about the wp-hackers mailing list