zoejessica.com

Adding a vCard download to your Wordpress site

I wanted to add a link to download a vCard from my custom sidebar.php file, but wasn’t able to stop Wordpress from serving it as a .txt file instead. Instead I used this solution to add my contact details in semantic html and also serve up a dynamically generated vCard file.

Microformats are all the rage right now – these standardised bits of html are being used to semantically mark up common bits of data such as contact details. Here’s how I created the link:

  1. Create an hCard using this form
  2. Copy and paste the code into a page on your site. This can be styled any way you need with CSS (or hidden using a negative text-indent property).
  3. Use technorati’s Contact Feed service to generate a vCard from this embedded information. Add the following url as a standard link: http://feeds.technorati.com/contacts/http://yoururl.com/page. Remember to use the page where the hCard html is located.

You can see the finished download link on the Virtual Worlds page.

2 Responses to “Adding a vCard download to your Wordpress site”

Leave a comment