just_a_tweet function and short code that allows you to display only
the most recent Tweet from a Twitter feed.
This came about because I wanted a way to display my most recent tweet in the
header of my site. Looking through dozens of Twitter plugins I couldn’t find
one that just got the most recent tweet without too much extraneous HTML and
also cached the request. This function does both.
- Activate the plugin through the ‘Plugins’ menu in WordPress
<?php just_a_tweet('username'); ?>in your templates
just_a_tweet takes up to 4 parameters
$twitterUser – Required – The name of the Twitter user you want to request
$cacheAge – Optional – Number of minutes after which the cache is considered stale. Defaults to 5
$forceRefresh – Optional – If true then the cache is not used, although it is
still filled. Defaults to false
$echo – Optional – Whether the function should also echo out the HTML built. Either
way the HTML is returned. Defaults to true
Using the shortcode
There is also a shortcode just_a_tweet that you can use inside your posts and pages.
[ just_a_tweet twitteruser=yourtwitter ] will pull the most recent tweet from
whatever Twitter account you pass as
There are no reviews for this plugin.
Contributors & Developers
“Just A Tweet” is open source software. The following people have contributed to this plugin.Мүчөлөрү
- No real change, just updating to switch to a new site
- Switched to using a newer Twitter API call
- Wasn’t working if latest tweet was a retweet. Would cause an error on the first
page view and then a JSON error after it was pulled from cache.
- Added just_a_tweet short code so you can use this inside a post or page without
having to enable PHP code.
- Initial Release