previous / next_post_link() within a custom taxonomy term

Here’s a handy little patch that Presentations and Backgrounds

Up until now the previous_post_link() and next_post_link() WordPress functions have just had a paramter $in_same_cat which if true returns a link to the previous/next post in the same category as the current post.

In WordPress 3.8 that is now a new $taxonomy parameter which allows you to specify a custom taxonomy rather that a category. This will be immensely useful to anyone who uses custom taxonomies and custom post types.

As an example, WordPress Post Formats are actually a custom taxonomy so you could use the following code to output a link to the same post with the same post format as the current post:

<?php next_post_link( '%link', 'Next post in category', TRUE, ' ', 'post_format' ); ?>

This update affects all the following functions:

get_previous_post(), get_next_post(), get_adjacent_post(), get_adjacent_post_rel_link(), adjacent_posts_rel_link(), next_post_rel_link(), prev_post_rel_link(), get_boundary_post(), get_previous_post_link(), previous_post_link(), get_next_post_link(), next_post_link(), get_adjacent_post_link(), adjacent_post_link()


Apache 2.0 License is OK if you need to package a script with a plugin on

I was putting together a plugin recently in which I wanted to include a third party open-source JavaScript. The JavaScript was licensed as Word Templates which says that it is GPL compatible.

Anyway, I reached out to @markjaquith and @Otto42 just to confirm that Apache 2.0 scripts are OK to include in the plugin repository, and they are…


BBC Travel Alerts on Twitter


So, this is how Twitter could be useful!

I have to say, I haven’t really got into Twitter yet. My one and only ‘Tweet’ is now over 1 month old which shows my embarrassing failure to get to grips with what Twitter is all about. Yes, I’m one of the 552,828 followers of Stephen Fry (at the time of writing), but up until now I’ve failed so see the usefulness of Twitter in a real-world environment – not just to know when Stephen in going to be “Back in time for tea”.

So, hit London with 48 hours of tube strikes and suddenly it all becomes clear. Follow BBCTravelalert on Twitter and get instant up-to-date feedback on the latest travel situation from London’s commuters – much more useful that the TFL service updates which are rarely accurate.