oEmbed work on localhost but not on distant server

It’s a missing configuration on the apache hosts file which cause troubles on serveur ‘self call’. For exemple, if serveur is using domain.com, I’ve a timeout when I typing curl domain.com with shh. Adding 127.0.0.1 domain.com in /etc/hosts file and it’s work !

Displaying cf post formats with oembed

<?php if (strstr($audio, ‘<iframe’)) { echo $audio; } else { echo wp_oembed_get( get_post_meta($post->ID, ‘_format_audio_embed’, true) ); } ?> Of course, this would require that you get the custom field with the audio embed code or url into $audio 🙂 Edit – try: <?php $audio = get_post_meta($post->ID, ‘_format_audio_embed’, true); if (strstr($audio, ‘<iframe’)) { echo $audio; } … Read more

Wrap iframes/embeds, but do it before oEmbed happens

WordPress embed the URLs on same filter with priority of 8 in /wp-includes/class-wp-embed.php // Attempts to embed all URLs in a post add_filter( ‘the_content’, array( $this, ‘autoembed’ ), 8 ); and you are parsing content after it with priority of 10 then defiantly you will get the parsed output. You just need to do it … Read more

class-oembed Error

The function _wp_oembed_get_object was moved from class-oembed.php to embed.php a while back – your best bet is to reinstall WordPress.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)