WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Add New Provider oEmbed

[Resolved] Add New Provider oEmbed

  • firewalker
    Member

    @firewalker

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi
    Forum Moderator

    @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');
    firewalker
    Member

    @firewalker

    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 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Add New Provider oEmbed’ is closed to new replies.