Add twitter status updates to wordpress themes
The easy way to display your twitter status on wordpress themes is using wordpress plugin. I recomended to using this twitter for WordPress plugin.
Installation
First, download the plugin from here.
Drop the twitter-for-wordpress folder into /wp-content/plugins/ and activate the plug in,
Or for wordpress 2.7, browse the plugin zip folder from wordpress admin panel, and activate the plugin.
Usage
Twitter for WordPress has several configurable options. Here’s what you can configure:
twitter_messages('username', [msgs], [list], [timestamp], ['link'], [hyperlinks], [twitter_users], [encode_utf8]);
- username: your twitter username
- msgs: number of tweets to show (max. 20, limited by Twitter)
- list: show tweets in a unordered list
- timestamp: show a relative timestamp
- linked: the link options
- ‘all’: puts a link to the tweet status in all the tweet (the old-school way). This option disables the link discover features.
- false or ”: no link at all to the tweet status
- true or ‘something’: enable the link to the tweet status. You can customize the text.
- hyperlinks: show URLs as clickable links
- twitter_users: show @username replies as clickable links
- encode_utf8:turn it on if you have encoding problems
For example:
<?php twitter_messages('blogfreaakz', 5, true, true, true, true, true, true); ?>
This code will showing 5 last twitter status updates.
Just placing the source code above wherever you want. You can placing on your sidebar (sidebar.php) or on your footer (footer.php) on your wordpress themes.
Other usage
twitter_messages('username', 3, false, true, 'Go', false, false, true);
The source code above will show my last 3 messages, not in a list, with timestamps, with a Go link, no links and encode_utf8.
Download: twitter for WordPress
2 Comments
Twitter Scripts
12.27.2009
Good post
, i just saw one intresting site where you can buy ready-to-deploy twitter apps , so build on your own twitter apps site .
http://www.scripts4twitter.com
mupet
12.27.2009
Hi Twitter Script, nice info. I interesting with your script especialy friend or follow. But i get this error when i try the demo page
Warning: curl_setopt_array() [function.curl-setopt-array]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/pankaj/public_html/demos/Friend or Follow/twiddler.class.php on line 47
Warning: curl_setopt_array() [function.curl-setopt-array]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/pankaj/public_html/demos/Friend or Follow/twiddler.class.php on line 47
There are no trackbacks to display at this time.