Forums
Forums / Fixing WordPress / Add New Provider oEmbed
(@firewalker)
16 years ago
I added this function in my theme’s functions.php but doesn’t work. What would be wrong?
functions.php
// Add Slideshare oEmbed function add_oembed_slideshare(){ wp_oembed_add_provider( '#http://www\.slideshare\.net/.*/.*', 'http://api.embed.ly/v1/api/oembed',true); } add_action('init','add_oembed_slideshare');
Thanks you for your attention.
(@esmi)
Try:
function add_oembed_slideshare(){ wp_oembed_add_provider( 'http://www.slideshare.net/*', 'http://api.embed.ly/v1/api/oembed',true); } add_action('init','add_oembed_slideshare');
This one works:
// Add Slideshare oEmbed function add_oembed_slideshare(){ wp_oembed_add_provider( 'http://www.slideshare.net/*', 'http://api.embed.ly/v1/api/oembed'); } add_action('init','add_oembed_slideshare');
Apparently I must refresh(update) post that contains the oEmbed in order to see the change 🙂
The topic ‘Add New Provider oEmbed’ is closed to new replies.