How to Shorten Your Twitter Feed in a Blog Widget

After embedding your Twitter feed on your blog you will notice that may show upwards of 10 tweets or more, which takes up a lot of space in your sidebar. I recommend only showing 3-5 tweets in your feed. To shorten your Twitter feed, you can adjust the embed code by doing the following: 

1.  Go to the Text widget where you’ve pasted the embed code from Twitter. You will see something similar to this:

<a class=”twitter-timeline” href=””>Tweets by LeighCassell</a> //

2.  The next step is to insert a line of code to change the number of tweets showing in your feed. Insert the following line of code after “twitter-timeline” (data-tweet-limit=”5″) so it now reads like this:

<a class=”twitter-timeline” data-tweet-limit=”5″ href=””>Tweets by LeighCassell</a> //

You can change the number in quotation marks (data-tweet-limit=”5″) to any number you want based on the number of tweets you want showing at a given time. For example, if you only want 3 tweets showing, your new code will read like this:

<a class=”twitter-timeline” data-tweet-limit=”3″ href=””>Tweets by LeighCassell</a> //

3.  Save your changes to the Text widget and you’re done!

These instructions have also been added to the Help and Support document, Adding Twitter to a Sidebar Widget

If you have any questions or need some extra help I’m just an email away…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: