WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Add New Provider oEmbed (3 posts)

  1. firewalker
    Member
    Posted 4 years ago #

    I added this function in my theme's functions.php but doesn't work. What would be wrong?

    // 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.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    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');
  3. firewalker
    Member
    Posted 4 years ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Topic