September 7th, 2006

Using Microformats in WordPress

As introduced earlier, we’ll be looking at how to implement microformats in individual blog platforms. We’ll start with WordPress.

There are two approaches you can take. One: Manually pasting relevant microformat code created via microformat creators. Step-by-step instructions are as follows:

  1. Fill in the web forms over at the relevant microformat creators. Here are the main ones:
  2. Paste the code generated by the microformat creators above into your post via your Write Post panel. For example, this is how code generated via the hReview Creator looks like:

    <div class="hreview"> <abbr class="dtreviewed" title="20060901T1200">Sep 1, 2006</abbr> by <span class="reviewer vcard"> <span class="fn">anonymous</span> </span> <span class="version" style="display: none;">0.3</span> <p style="font-size: smaller;">This <a href="http://microformats.org/wiki/hreview">hReview</a> brought to you by the <a href="http://microformats.org/code/hreview/creator">hReview Creator</a>. </p> </div>

    Since you’ll be pasting HTML, you will either have to use the non-rich text editor, or enter the HTML-mode of the WYSIWYG editor.

  3. Publish the post (as usual).

Note: You might also want to read Markus Merz’s post over at Performancing for a general guide on this approach.

The second approach involves the use of specialised WP plugins to create microformat-ted content right from your admin panel. This seems to be the cleaner and more streamlined method.

  • The exact steps to take will differ depending on the microformat type and plugin you use. Therefore, I’ll just list the plugins available for WordPress, and a link to relevant documentation (if available):
    1. Multiple format plugins:
      • Structured Blogging – Supports hReview, hCalendar, hCard, and various other elemental microformats (i.e. XFN, relLicense, relTag, and XOXO).
      • WP-Microformats – Supports hCalendar and hCard. Adds buttons for each microformat to your Write Post panel, each of which toggles the relevant popup form.
    2. hReview plugins:
      • hReview WordPress Plugin – Adds the appropriate form fields (which you can toggle on/off) in your Write Post/Page panel.
      • WP-Movie Ratings – Movie reviews published via this plugin are in the hReview microformat.
    3. hResume plugin:
      • hResume Plugin – Creates a new page for your resume, marked up in the hResume microformat.
    4. hCalendar plugin:
    5. hCard plugin:
    6. MicroID plugin:
    7. XFN-related plugin:
      • Happy Pals – This isn’t exactly a plugin for the XFN microformat itself, but it does automatically apply CSS classes to any rel attached links (e.g. rel="friend"), so you can apply custom styles denoting the various relationships in your links.
  • Besides plugins, there are custom WP themes with support for the hAtom microformat. A few examples are as follows:
    1. Sandbox Theme
    2. Strangelove (Modified Kubrick) Theme

    You may also be interested in more information regarding hAtom support for WordPress themes.

That’s about what I could find. Anything I missed?

Update: Thanks to the microformats.org blog for pointing out Happy Pals (XFN-related plugin).

If you found this post useful, keep updated with future posts by subscribing to blogHelper (for free) through RSS or email.

Remember to share this post as well (if you liked it, of course): These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • Fark
  • Furl
  • Ma.gnolia
  • NewsVine
  • Reddit
  • YahooMyWeb

68 Comments