/ Published in: PHP
I found this code for adding a custom twitter widget to your functions file, it's been useful on more that a few occasions. So thought I would add it to the blog as well as development. As the code needs the twitterupdatelist ID it's not possible to put more than one of these on a page so I haven't made it into a multiple widget.
Expand |
Embed | Plain Text
<?php function widget_mytheme_twitter() { ?> <div> <ul><li><h2><a href="http://twitter.com/MYTWITTER">My Twitter Feed</a></h2> <ul id="twitter_update_list" ><li><script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script> <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/MYTWITTER.json?callback=twitterCallback2&count=5"></script></li></ul> </li></ul></div> register_sidebar_widget(__('Twitter feed'), 'widget_mytheme_twitter'); ?>
You need to login to post a comment.
