Twitter Widgets Changes

Update: October 2016: The jetpack twitter widget has been updated. You now no longer need the id, you can add a widget just using your username. This post will be updated soon.

Twitter has changed the way it provides widgets.

In the past you could add a timeline of your tweets by creating a widget on twitter and using the id of that widget in the Twitter Timeline (Jetpack) widget.

Most widgets for twitter embeds no longer have ids.

more information: WordPress › Support » Twitter no longer allows the creation of a Twitter ID

Twitter embeds are produced by a link and a script tag:

<a class="twitter-timeline" data-height="500" href="">Tweets by johnjohnston</a>
<script async src="//" charset="utf-8"></script>

There is no id to put in the twitter widget.

You can paste that code into a text widget. This will strip the script tag out for security reasons. The widget will just display a link.

If you add the ‘Twitter Timeline (Jetpack) widget’ as well, without filling in any fields, the timeline will display properly.

Unfortunatly this strips the data-height=”500″ paramater so the widget display as very tall indeed.

You can fix this but wrapping the code for the widget in more code:

<div style="height:400px;overflow:auto">
<a class="twitter-timeline" href="">Tweets by johnjohnston</a>

Where 400 is the height in pixels that you want the widget to be.

The only widget that provides an id is the search widget, you can use from:username in the search field to make a widget that you can extract an id from to use in the jetpack widget.



Leave a Reply

Your email address will not be published. Required fields are marked *