Post navigation

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:

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]

  • Pingback: How To Embed Tweets in a WordPress Post « Modern Media

  • RealtimeReport

    @bestofzsazsa ha – awesome – I *just* signed your holiday card! you’ll see it next week & thx for the RT! – Tonia :-)

    • bestofzsazsa

      @realtimereport love it! looking forward to receiving it :) thank you and a great weekend to you! ~ ZZ

  • Pingback: Maandag in #blogpraat | Lings.nl

  • LauLau81

    This is very clear instructions…thanks a lot for sharing it as well…

  • AnneWeiskopf

    Thanks! I’m going to try this. Then call @chriscarson when I fail miserably! xo

    • cdcarson

      @AnneWeiskopf@ChrisCarson Did it work? You are my test rabbit.

      • AnneWeiskopf

        @cdcarson@ChrisCarson I’ve always wanted to be a bunny! I’m currently swamped by it is on my list for this weekend. I’ll let you know!!

  • newtbarrett

    Only an autodidact would use the word autodidact.

    • cdcarson

      @newtbarrett A didactic statement, Newt, yet probably true.

  • Pingback: Embedding Tweets on Your WordPress Blog @chriscarson @RealtimeReport | Digital-By-Design | Scoop.it

  • PaulDoyle

    Hi, I’ve been searching for a way to embed only latest tweet… rather than specifying a tweet ID…. Am I missing something?

    • cdcarson

      @PaulDoyleThat’s a different thing. Our plugin is for embedding individual tweets as “quotes” in posts, not the latest tweet from a user. You can probably use Twitter’s own widget — https://twitter.com/about/resources/widgets — in a WordPress text widget in your sidebar. Just paste in the code that Twitter gives you. Hope that helps — Chris

      • PaulDoyle

        @cdcarson@PaulDoyle Hi Chris, many thanks for your response. Yes I think you’re….

        It’s a pity that the widget doesn’t offer the nicer interface and layout of the web intents version…

        • cdcarson

          @PaulDoyle I agree. It would be relatively easy to do as long as you are interested in displaying one “latest” tweet from one user. I’m fleeing the country for the holidays, but will see what I can do when I get back. In the meantime someone else might have developed what you want. Have you searched the plugins repository?

        • PaulDoyle

          @cdcarson Yeah I’ve tried a few different plugins and they all provide “some” of the functionality I’m looking for but none provide it all. http://wordpress.org/extend/plugins/twitter-blackbird-pie/ was the closest which does pretty much what you have outline in your article… but only for specific tweets….

          I think I’m going to go with the Twitter widget you pointed me to and just CSS the hell out of it :-). … many thanks for your help. Enjoy you country fleeing holiday ;-)

        • Gerrit Brands

          @PaulDoyle@cdcarson

        • Gerrit Brands

          @PaulDoyle@cdcarson Hi, I’ve been trying to do exactly the same thing with my own twitterfeed. I’ve set up this plugin as well as the webservice at http://www.ifttt.com.

          Check here http://t.co/WRX1Pj4t for ifttt, here for the result http://brands-urk.nl/?p=1140 and here for setuphttp://brands-urk.nl/?p=1156. It’s mostly in Dutch, Hope it still helps.

  • Pingback: “Modern Media Tweet Shortcode” caching woes. | OnePeople

Post navigation