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.

upload1

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.

status

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

Leave a Reply