April 15th, 2008 WordPress 2.5 Shortcodes
First I touched on the topic in my first impressions of WordPress 2.5. Then I whined a little about the tickets relating to them, and eventually I released my Google Maps Plugin that uses them. In the end, WordPress’s new shortcodes are really nice.
What are they?
First of all, a shortcode called “mycode” can look like any of these:
[mycode] [mycode foo="bar" id="123" color="red" something="data"] [mycode]Some Content[/mycode] [mycode]<p><a href="http://example.com/">HTML Content</a></p>[/mycode] [mycode]Content [another-shotcode] more content[/mycode] [mycode foo="bar" id="123"]Some Content[/mycode]
As you can see, shortcodes allow a user to put a code into a post or page, and a plugin can then easily handle those codes. They can be nested, contain content (including HTML), attributes, etc. Sounds great, but how can you leverage shortcodes for your benefit?
How can I use them?
You want to leverage the new, powerful shortcode system in WordPress 2.5, but where do you start?
Read the rest of WordPress 2.5 Shortcodes »