This plugin is really easy to use. There are a few simple steps that must be taken prior to installing the plugin:
- Fill in the Profile ('/wp-admin/profile.php') field 'Nickname' with your Twitter username. This allows us to bypass
any custom database modifications. Hey, it's there - why not use it?
- Each post that you would like to utilize the custom ReTweet link must have a 'custom field' called retweet_url. It
is through the use of this custom field that we are able to dynamically pull the encoded URL related to each post.
If you don’t fill in this custom field for a post, then the ReTweet link will be absent from that post and the
plugin will degrade without a hitch.
- If you’d like to style the link (perhaps you want to use a CSS image rollover instead of a plain Jane link), the
CSS class is reTweetPost.
Once you’ve completed the aforementioned steps, follow these step by step instructions to activate the plugin:
- Move the 'twitter-retweet' folder into your 'wp-content/plugins' directory and upload to your remote server
- Login to your WordPress account
- Navigate to the 'Plugins' section or go directly to '/wp-admin/plugins.php'
- Activate the 'Twitter ReTweet' plugin
Copy and paste the following code into the desired template(s) (we use the single.php template); the code should
be placed within the WordPress loop:
<?php if(function_exists('twitterReTweet')) {
echo twitterReTweet();
}?>
Save and upload the modified template file(s)
- If you’ve done everything correctly, then you should see the ReTweet link on the pages/posts that have the
'retweet_url' custom field filled in. The link, when clicked, will fill the following information into the visitor’s
Twitter.com status box (they will need to click the 'Update' button to post it): 'RT @username: Post Title -
hyperlink'. Our real world example is located beneath the author box of this post.