Shortcodes, Widgets & Sidebars

Widgets »Twitter Timeline Widget

Twitter offers embeddable timelines that allow you to display any public Twitter feed on your blog. These timelines are interactive, so readers can reply, retweet and favorite tweets straight from your blog or website.

You can use our Twitter Timeline widget to put a timeline in your sidebar, or other widget area on your blog.

Create a widget by going to My Sites and selecting Customize:

customize-widgets-092015

Under Customize, go to Widgets, then Add a Widget:

add-a-widget-092015

Search for “Twitter” and you’ll see a Widget option for adding your Twitter Timeline:

twitter-widget-092015

Click to expand the widget settings, and add your Twitter username under “Twitter Username.”

twitter timeline widget settings

Here is the full list of options supported by this widget:

  • Title: Set a custom title to be displayed above the widget. The default text is “Follow me on Twitter,” but you can also change it to anything you like (e.g. “I’m on Twitter” or “Recent Tweets”).
  • Width: You can set a specific width (in pixels) for your timeline. If you leave this blank then it will try to automatically fill your sidebar.
  • Height: You can make your timeline taller or shorter by setting a height. The default is 400px which will normally show 2 or 3 of your most recent tweets (you can see the rest by scrolling).
  • # of Tweets Shown: This setting overrides the “Height” setting – if you select 5 tweets, it will always show 5 with no scroll. If you don’t set a # of tweets, it will fall back to your height setting, and you can scroll to see more tweets.
  • Widget Type: Either “Profile” (showing the tweets from a user’s public profile) or “Widget ID” (showing the tweets from a widget configured in your Twitter settings).
  • Twitter Username: The Twitter user whose public tweets will be displayed in the timeline widget. Only appears if Widget Type is set to “Profile”.
  • Widget ID: A unique number that identifies your widget with Twitter. See the below section on widget IDs for where to get this number. Only appears if Widget Type is set to “Widget ID”.
  • Layout Options: You can play around with these options to change how your timeline looks. You’ll see a preview of the changes in your Customizer.
  • Link/Border Color: If you’d like to customize your timeline to match your theme better, then you can enter the hex code for a color in these boxes.
  • Timeline Theme: Twitter provides a dark and a light color theme for the timeline, so depending on your blog’s theme, you might want to change this.

Once you’re done setting your options, just click Save and you can refresh your site to see it in action.

Using Twitter Widget IDs

You can also embed a widget that is configured in your Twitter account settings. This option allows more flexibility – you can display tweets from any Twitter search, like a hashtag, phrase, or other supported search query. (To display tweets from your profile, use the “Widget Type” option instead).

First, go to Twitter and create your Twitter widget or pick an existing widget. There, you can pick your color scheme and size your Twitter widget.

twitter new search widget

Once you’re done, click “Create widget” or “Save changes”.

Your widget ID is the long number you see in the URL while editing your Twitter widget:

twitter-widget-id

Copy this widget ID — you will need it to display your customized Twitter Timeline on your blog.

↑ Table of Contents ↑

Embedding with a Shortcode

You can also embed your Twitter Timeline on a post or page on your blog.

To insert the timeline into a WordPress.com post, paste the following shortcode into your post editor:

[twitter-timeline username=yourhandle]

In the shortcode, username is your twitter handle, without the @ symbol.

That’s it! When you publish the post, it will look something like this:

Or, if you have a Twitter widget ID, enter it like this:

[twitter-timeline id=1234]

Not quite what you're looking for?

Get Help