oEmbed does not seem to work on my theme. I simply see the bare URL. I haven't been able to find instructions on how to implement it.
Thanks.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityoEmbed does not seem to work on my theme. I simply see the bare URL. I haven't been able to find instructions on how to implement it.
Thanks.
You didn't give the URL. Please check if oEmbed url listed on the internal WordPress whitelist
Had the same problem, got solved here
I just add the code from the last comment in my child themes functions.php, now embeds are working fine. Seems to be necessary because of automatically added paragraphs
The code for functions from the reference mentioned above:
add_filter( 'the_content', 'my_autoembed_adjustments', 7 );
/**
* Add a new line around paragraph links
* @param string $content
* @return string $content
*/
function my_autoembed_adjustments( $content ){
$pattern = '|(?<!")(?<!"\s)(https?:\/\/[^\s"\[<]+)|im'; // your own pattern
$to = "<p>\n$1\n</p>"; // your own pattern
$content = preg_replace( $pattern, $to, $content );
return $content;
}
the_content
. does your theme output content viathe_content
? is there any code in your theme removing filters onthe_content
? – Milo May 3 '14 at 1:18