Our new Defra site plays nicely with PDFs

In the late March dash to complete jobs before the end of the financial year, not to mention the imminent election declaration, I pushed a couple of websites live without having the time to blog about them.
One of these was another little job for Defra: a WordPress-based satellite site for their Science Advisory Council. It’s a fairly modest site, sticking very closely to Defra’s house style, and based to a significant extent on previous work I’ve done for them. But it does have one innovation worth flagging.
The site’s main objective is transparency, making documents from its quarterly meetings publicly available. Inevitably, like it or not, that means a lot of PDF files. WordPress’s media library function makes it easy to upload these as attachments to posts (or indeed, pages): but we had the idea to take things a step further.
One underused feature of WordPress is the ability to add ‘custom taxonomies’: distinct classifications based on either the (hierarchical) category or (freeform) tagging model. But if you’re smart about it, you can also hook this same functionality into the media library – allowing you to add ‘tags’ to the documents you upload. And once you’re doing that, you can benefit from all the other features you’re used to with tags and categories.
So there’s a page on the SAC site which presents this custom taxonomy (unimaginatively labelled ‘Upload tags’) as a tag cloud. Click on a tag, and it takes you to an archive page of all uploads (ie PDFs) relevant to that tag – eg meeting minutes – which can be based on a special page template. (And you can also get RSS feeds of each element in the custom taxonomy, by adding ‘/feed’ to the URL in the usual way.)
We’ve also written a routine into the standard post template to extract details of attached files, and present them automatically in a nice table, with a bit of automated metadata too – see this page as an example.
There are plenty of reasons why you shouldn’t rely on PDF as your primary publishing channel; but sometimes, you have to accept it’s the only practical solution. And in this case, I hope we’ve shown it’s possible to make something of a virtue of it.