WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to embed a Ted talk video using the shortcode:

[ted id=myid]

But it's not working. It shows the text instead of the video. Is there any configuration I need to check to make it work?

share|improve this question
What plugin do you use for that? – toscho Oct 10 '12 at 13:31
I followed the steps written here: en.support.wordpress.com/videos/ted-talks so i didn't install any plugin – flero Oct 10 '12 at 15:11
up vote 4 down vote accepted

Unfortunately, this is going to be a problem for you.

The [ted] shortcode is specific to WordPress.com - not to a self-hosted site where you installed the software yourself from WordPress.org.

The only embeds that WordPress.org's software supports by default are listed in the Codex:

  • YouTube (only public videos and playlists - "unlisted" and "private" videos will not embed)
  • Vimeo
  • DailyMotion
  • blip.tv
  • Flickr (both videos and images)
  • Viddler
  • Hulu
  • Qik
  • Revision3
  • Scribd
  • Photobucket
  • PollDaddy
  • WordPress.tv (only VideoPress-type videos for the time being)
  • SmugMug (WordPress 3.0+)
  • FunnyOrDie.com (WordPress 3.0+)
  • Twitter (WordPress 3.4+)

There is a plugin available for embedding Ted talks, though. TEDTalks Embedder. But it only lists compatibility through WP 3.2.1, so it may not work with the current version (it may, but I can't guarantee it).

Alternative Actual Embeds

Here's an alternative if you don't want to use a plugin. Add the following to your theme's functions.php file:

// Whitelist the TEDTalks oEmbed URL
wp_oembed_add_provider( 'http://www.ted.com/talks/*', 'http://www.ted.com/talks/oembed.json' );

function ted_shortcode( $atts ) {
    // We need to use the WP_Embed class instance
    global $wp_embed;

    // The "id" parameter is required
    if ( empty($atts['id']) )
        return '';

    // Construct the TEDTalk URL
    $url = 'http://www.ted.com/talks/view/lang/eng/id/' . $atts['id'];

    // Run the URL through the  handler.
    // This handler handles calling the oEmbed class
    // and more importantly will also do the caching!
    return $wp_embed->shortcode( $atts, $url );
add_shortcode( 'ted', 'ted_shortcode' );

Now, you can embed TEDTalks two ways:


share|improve this answer
Oh,ok! And yes TEDTalks Embedder does not work on my testing site ( WP 3.4 ) but it could work on the site i need it because it uses a lower version of WP. – flero Oct 10 '12 at 15:32
If it doesn't, I've edited my answer to provide you a way to add the shortcode handler yourself by dropping some code in your theme's functions.php file ... oh, and I tested it to work on the latest version of WP. – EAMann Oct 10 '12 at 16:12
Thanks - perfect! – D. Lambert May 20 '13 at 18:48

The Jetpack plugin will allow you to use the [ted] shortcode on your WordPress self-hosted site.

share|improve this answer

protected by Community Sep 10 '13 at 7:18

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.