WP List Tweets
Thursday, January 14th, 2010 9:46 pm
Download from WordPress Page
What is it?
‘Wp List Tweets’ is a free plugin for WordPress that allows you to easily add the latest Tweets from any user, anywhere in your WordPress site.
An Example
Features
- Use as many times as you want on each page, even within the same post.
- Display as many different users as you want (one each time you use it).
- Control the number of Tweets.
- Add custom styling.
Installation and Activation
Get The File:
- Navigate to ‘Plugins->Add New’ and use the Plugin Browser to search for ‘WP List Tweets’ right from your site’s admin section and ignore the rest of this section. Or…
- Download the file here: Download From WordPress Page
- unzip wp-list-tweets.zip
- upload the file wp-list-tweets.php to your ‘/wp-content/plugins/’ folder.
- Navigate to the ‘Plugins’ menu in the admin section.
- Look for ‘WP List Tweets’ and activate it.
Activate and Add username:
- Navigate to ‘Settings->WP List Tweets’.
- Add the Twitter username you want to use as a default
How To Use it In a Page or Post or Widget
- Within a post or page, you can use the shortcode to add it anywhere you want.
- shortcodes are used by typing the code between brackets like this: [shortcode]
-
[
wp_list_tweets]Will dsiplay the last 3 Tweets from the default user as set in the plugin’s options. If you have not set a default user, it will display the latest 3 from me. (Someone had to be the default…)
-
[
wp_list_tweets user="username"]Will dsiplay the last 3 Tweets from ‘username’.
-
[
wp_list_tweets user="username" num="5"]Will display the last 5 Tweets from from ‘username’.
- Normally WordPress will not take shortcodes within your widgets. However by adding one line of code, you can make this possible. I have added this line into this plugin, but if you want to make this options available anytime, you can also add the following to your theme’s ‘functions.php’ file
add_filter('widget_text', 'do_shortcode');
How To Use it In Your Theme Files
- Within a theme file, you use the template tagwith the same variables available:
-
<?php wp_list_tweets(); ?> -
<?php wp_list_tweets('username'); ?> -
<?php wp_list_tweets('username','5'); ?>
-
Customizing the Look
The Tweets are displayed in an unordered list. The HTML will be a <ul> element wrapping a series of <li> elements (one for each tweet). Like this:
<ul id="twitterList-username-1" class="twitterList username"> <li>TWEET #1 WILL GO HERE</li> <li>TWEET #2 WILL GO HERE</li> <li>TWEET #3 WILL GO HERE</li> </ul>
The plugin adds some default styling which is easily to override. To add custom style to all Tweet lists, Just add the following to your theme’s style.css:
ul.twitterList {}
ul.twitterList li {}
You can also target each use separately, nice for multi-author sites:
ul.username {}
ul.username li {}
The id uses ‘twitterList’ followed by whatever the username is, follwed by a running number of the times the plugin was used on that particular page. That way you can target any one of them specifically. For the plugin to work, each instance needs a unique ID anyway, so whether or not you use it for the style, the unique ID is still needed.
Advanced Use
There is one more variable that can be added to the template tag or to the shortcode. If you want to specifically style any one instance of the plugin, you can add an extra phrase to the ID of the <ul> wrapper, which will replace the running count number at the end. Instead of – <ul id=”twitterList-username-2″> – , where the number is somewhat arbitrary and likely to change if you add other instances, you could make it – <ul id=”twitterList-username-myCustomID”>.
To add ‘MyCustomID’ to the ID of the <ul> wrapper, the template tag would look like this:
<?php wp_list_tweets('username','5', 'MyCustomID); ?>
The shortcode would look like this:
[wp_list_tweets user="username" num="5" id="MyCustomID"]
Future of the Plugin
I’m not sure how much more I will put into it, but one idea I had was to add the option to select some colors from the options page in the backend for users unfamiliar with CSS.
Feedback and Support
Any feedback is welcome but I can’t promise any real support. I developed this in my spare time and am simply offering it up as-is. I would definitely be interested in hearing about any bugs or ideas for improvement, though so feel free to leave any comments below.
Download from WordPress Page
17 Comments to WP List Tweets
Trackbacks/Pingbacks
-
[...] List Tweets für WordPress 26. Januar 2010 | | Autor: Karl-Heinz Mit dem WP List Tweets Plugin für WordPress Blogs kann man ganz beliebige Twitter Tweets an beliebiger Stelle in ein [...]
-
[...] on those buttons. Save your journal from effort tagged as sound spammer by instalment this plugin.WP List TweetsWP List Tweets easily displays some sort of stylish Tweets from some user, anywhere on the site, [...]
Leave a Reply
Additional comments powered by BackType


Great Plugin. Exactly what I was looking for to include multiple tweets of different users. But what about hashtags like e.g. #Test ? They do not link like they do alex kings twitter tools. Could I get this to work too?
Hey Florian,
Thanks. Not sure about the hashtags. Maybe that will be added for the next version.
Hey.
First of all, nice plugin.
Secondly… it does not work for me. Shows only _____ once.
That’s all. I have inserted it in my footer.php in a sliding panel (right top of my website is the trigger).
What can i do to fix it? In the admin panel it shows the latest tweets from me correctly.
Best regards,
Michael
Hey Michael,
Thanks for trying it out. It sounds like you either placed it after the wp_footer() function or your theme does not have a wp_footer() function. Check the WordPress codex for info on that if you don’t know what that means.
Thanks for your answer.
inserted the missing wp_footer() and now it works
About to “style” it tomorrow… Noch mal Danke
Thanks again
Cool. That’s something you should check on all themes anyway. ‘header.php’ should contain wp_head() and ‘footer.php’ should contain wp_footer(). A lot of plugins require those to work.
That is a cool tab interface you use on your site, btw. Haven’t seen that before.
You can get it here:
http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/
how exactly do i add this line of code you’re saying above, and where to add it, if i want to use this plugin as a widget? i’m using the P2 theme.
thank you.
You should be able to use the shortcodes by placing them in a text widget.
xD
Nice Code. Good to setting up.
Now my last tweet stands under my bloglogo.
*HAPPY*
Hi,
that is exactly what I am looking for but also for protected accounts.
Any Ideas?
Greetings from Hamburg,
Ralf
Hey Ralf,
Not sure what you mean by protected accounts?
Hey,
the download links are wrong!
Thanks! Should be fixed now.
TOP!
BUT: You can`t install the Plugin via WP/Plugins/Install. I had to load it manuel on my server. WAYNE^^
Nice work. The rest is “do it yourselfe”