Viewing posts tagged with: shortcodes

April 15th, 2008 WordPress 2.5 Shortcodes

Warning: Shortcodes are affected by Trac ticket 6444, which was fixed in WordPress 2.5.1.

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 »

April 14th, 2008 Google Maps for Wordpress

Warning: This plugin was affected by Trac ticket 6444, which was fixed in WordPress 2.5.1, so get 2.5.1!

The Google Maps for WordPress plugin allows you to easily insert Google maps into your blog, making use of the new shortCode system in WordPress 2.5. The maps can be configured to offer directions to or from the location, show or hide the zoom/pan controls, show/hide map type, activate zoom using mouse wheel, and more.

It requires a Google Maps API key, and then gives you a nice interface near your editor to help you build the map and send it to the editor.

Search