Wordpress Shortcoder plugin: Create a Twitter widget Shortcode
In this blog post i will show you how to create Twitter widget Shortcode using the Wordpress Shortcoder plugin.
This excellent plugin for Wordpress enables developers to create custom Shortcodes quickly and easily. The Wordpress Codex describes what a Shortcode does:
"It enables plugin developers to create special kinds of content (e.g. forms, content generators) that users can attach to certain pages by adding the corresponding Shortcode into the page text." In other words, its a very easy way to add either simple or complicated content.
The Shortcoder plugins’ Shortcodes look like this: [sc:twitter-widget] "Sc:" is prepended before the name of the widget. This is specific to this plugin.
Now lets get to it. First of all download the plugin. Then install and activate it. Once activated, you will notice the Shortcorder menu has been added to the Wordpress admin sidebar.
Click on the Shortcoder link and you will be presented with the Create a Shortcode screen. Enter a name for the Shortcode (for example twitter-widget). Then head on over to the Twitter widget creation page.
Enter the username of the Twitter feed you want (in this example i have used the Gravitywell blog). Enter a title and caption that will be displayed in the widget. There are options for Preferences, Appearance and Dimensions that offer visual and behavioural changes – have a play around to see what you like.
Finally, click Finish & Grab Code button. Heres the important part – make sure you copy all the code that is given. Head on back to the Shortcoder plugin. Paste the code into the content area. Notice at the top right of the plugin window, your Shortcode is displayed – in this case it will be [sc:twitter-widget]. Copy this Shortcode name. Finally click Create Shortcode button.
Now, either create or edit a Wordpress page. In the editor window, paste the Shortcode. Click publish/update button. View the page and you will see the Twitter widget!