Setting a limit to Tweets displayed in an embedded timeline



Hey guys,

Quick thing - basically since we can’t use Widget IDs anymore to pull in to the Jetpack Wordpress plugin, I’m simply using a ‘Text’ widget and pasting the Twitter widget script in there.

BUT I’m wondering how to put a limit on the amount of Tweets displayed in this, so that it doesn’t keep getting longer and longer with every Tweet I add. Maybe it’s just a short piece of code to add to the existing code? This is the code I’m using at the moment:


Twitter embedded timelines receive a refresh in Jetpack 4.1. If you prefer using Jetpack you can switch to having the plugin manage embeds once the next plugin update ships.

You may set the Tweet limit by adding data-tweet-limit="4" to your <a> element. Replace 4 with the number of Tweets you would like to display.

<a class="twitter-timeline" href="" data-tweet-limit="4">Tweets by Travel_Acoustic</a> <script async src="//" charset="utf-8"></script>


Great stuff Niall, I’d just figured that out!

Cheers :slight_smile: