Mandula

- web, development, business 
« Back to blog

Adding your Twitter feed to your Posterous sidebar

Posterous a simple and elegant blogging solution. That's why I use it. And.. because I'm too lazy to install, maintain and customise my own Wordpress site (other blogging engines are available).

But after doing some minor customisation of a default theme I wanted to find a way of embedding my Twitter feed into the sidebar. As there is not direct way for doing this I used the following method to embed the standard Twitter widget.

Requirements: a Posterous account, a Twitter account, some external hosting, basic knowledge of HTML.

Firstly, create a Twitter widget using Twitter's widget creator. I chose to create a Profile Widget


To make it easier to embed enable auto-width on the dimensions panel. 


Once you're done creating and customising your widget click Finish & Grab code. Copy the code from the box.


Now create a HTML file like the following, pasting the code you just copied under <!-- Paste twitter feed here -->, replacing the code between the <body> tags:

Now upload this to your web host. As this is just a static file, I've used Amazon S3. Cheap and reliable. Check the file works outside of Posterous before you continue. The final step is embedding the widget into your sidebar. Log into Posterous and then Edit Settings > Theme and customize my site. In Advanced add the following code into {block:ListSidebar} (changing http://my-web-host.com/twitter.html to the location of your file). :

You may have to adjust the size of the iframe to stop scrolling. If you want to add your twitter feed to individual post pages as well you need to add the above text to {block:ShowSidebar}

Preview and save your changes.

Sleep well at night knowing people are slightly less likely to miss your tweets.

Comments (1)

Feb 04, 2010
Andy Bryant said...
Exactly what I needed. Thanks for sharing this.

Leave a comment...

 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     twitter