Embedding Tweets on Your WordPress Blog

Today at the Realtime Report we developed a WordPress plugin to embed Tweets using the Twitter API.  Like this:

[tweet https://twitter.com/OnionSports/status/145262716104351747]

I know that a plugin is available for WordPress.com sites, but I couldn’t find one for self-hosted WordPress.  I’m working on uploading our plugin to the WordPress.org repository — in the meantime you can download it here: Modern Media Tweet Shortcode. Update: we’ve uploaded it to the WordPress plugins site. Please download it there.

Instructions are below. Let me know @chriscarson if you like it.  Enjoy!

Installing the WordPress plugin

  1. Download and unzip the files.
  2. Upload the ModernMediaTweetShortcode modern-media-tweet-shortcode folder to your site’s wp-content/plugins directory.
  3. Activate the plugin.
  4. Go to the plugin’s settings page: Settings > Embedded Tweets. You may have to check off an option to include a javascript from Twitter. There are a couple of other fun options, like Chinese…

Embedding a Tweet — New Interface

These instructions are for the new web interface Twitter rolled out recently.  If you still have the old interface, scroll down.

From the timeline, click “Open” to show more options.

Click “Details” to go to the Tweet’s unique URL.

Click “Embed This Tweet”…

Click the “Shortcode” tab and copy the URL.

Edit your post.  Paste in the shortcode. It should look something  like this:

[[tweet https://twitter.com/OnionSports/status/145262716104351747]]

Click save and view the post.  Your embedded tweet should show up nicely:

Embedding a Tweet — Old Interface

If you don’t have the new interface yet (I don’t either — I had to hack a colleague’s account to take the screenshots above,)  here’s how you get the unique Tweet URL.

Click on the “sent” link from your timeline…

Copy the URL of the tweet…

You’ll have to type in the shortcode yourself.  The format is…

[[tweet theURLyouCopiedHere]]