RDFa in Practice: Part 1 – WordPress and Drupal

Last week I started with an introduction to RDFa and what it means in relation to the semantic web. For the past week I have been playing with WordPress, Drupal, Joomla and Umbraco to see how each works with tagging for the semantic web. In essence, you are able to mark up within all four of these CMSs. However, it’s interesting to see which support natively, which are reliant on third party plugins and which ones need good old elbow grease and coding skills each time you want to post. To begin with, here’s how to implement RDFa tagging within WordPress and Drupal.

WordPress

With Ubelly itself hosted on WordPress, I decided to start my search here. WordPress has some great SEO built into its core (which is outlined here), so I’m surprised that recent updates haven’t built in support for semantic markup beyond the standard meta tags. However, there are a few plugins that can come to your aid, depending on the kind of tagging you need.

To begin with, as a standard everyone should use Dublin Core for WP. This inserts standard Dublin Core markup into all of your posts and pages, including the following:

  • Site name as DC.publisher
  • Site URL as DC.publisher.url
  • Post title as DC.title
  • Permalink as DC.identifier
  • Date created as DC.date.created
  • Author (last name, first name) as DC.creator.name
  • Categories and tags as DC.subject (repeated element, excludes default category)
  • DC.language
  • DC.rights.license
  • Author name as DC.rights.rightsHolder

This, to begin with, is a great start for WordPress. However, if you want to get into the realm of rich snippets for major search engines, another plugin or three will be required…

Being a part-time theatre critic in an alternate reality, I naturally went in search of the best way to have review markup in the hReview format. While there are a number of plugins out there to choose from, most of them are quite restrictive and force you to place big ugly star ratings on your post. In fact, the best  plugin I found for Reviews happened to be an all in one plugin called WordPress SEO. While it has a lot of nice features, most importantly has a simple rich snippets area. All you need to do is choose ‘Review’ and choose your star rating. The markup in the title and the post itself take care of the rest.

For e-commerce sites, the GoodRelations for WP e-commerce plugin handles all of your product and pricing markup for you, while WP-RDFa handles FoaF tagging for relationship markup. However, my advice is to make sure Dublin Core support within WP-RDFa is disabled, as when installed with other programs, it seems to do some strange things (my titles were appearing twice).

Drupal

As mentioned previously, RDFa is now built into the core of Drupal 7. What this actually means is that Dublin Core and FoaF vocabularies are supported at the moment, with additional support for SIOC, SKOS and RDFs, with all of the following taken care of with every post:

Dublin Core

  • title
  • creator
  • date
  • modified

Friend of a Friend

  • document
  • page
  • name

SIOC (Semantically Interlinked Online Communities)

  • item
  • post
  • comment
  • reply of
  • has creator
  • number of replies
  • topic

SKOS (Simple Knowledge Organisation System)

  • concept
  • collection
  • member
  • prefLabel
  • definition
  • broader

RDFs (RDF Schema)

  • class
  • property
  • label
  • comment
  • type

This is a fantastic start and covers most of the standards. However, if you want to implement something like reviews or e-commerce markup, it’s a little bit trickier. After doing some digging around it seems that Drupal are definitely on their way to supporting more microformats, including GoodRelations and hReview, however at the moment those particular ones need to be coded in. If anyone knows of any modules for Drupal that take care of these then let me know in the comments.

Next up: Umbraco and Joomla

Published by Luke

Luke is one of Ubelly’s resident social media guys, occasionally switching hats for a bit of design. He is the in-house meme expert, uses foursquare a little too much and gets hot under the collar when it comes to design, usability and gorgeous code.

5 Comments So Far, what do you think?

  1. Pingback:Tweets that mention Underbelly » RDFa in Practice: Part 1 – Wordpress and Drupal -- Topsy.com

  2. Pingback:Foodime.com

  3. Pingback:wp-popular.com » Blog Archive » http://ubelly.com/2011/01/rdfa-in-practice-part-1-wordpress-and-drupal/

  4. Pingback:Underbelly » RDFa in Practice: Part 1 – Wordpress and Drupal | www.ardelahlam.com

  5. Backlinksnetwork.Info

    This has been really fascinating. How do you get your RSS feeds so I’m able to stay updated? And I love this topic!|

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>