a novelty choking hazard

notes on the Related Posts plug-in

I’ve had the opportunity to scan rather quickly through the last year’s posts, observing the links that this new Related Posts plug-in is showing, and I have some remarks. Anyone who comes here for whatever-the-hell-else need not pursue this beyond the jump. Plug-in developers and WordPress heads, however, may be diverted by what follows.

The plug-in works, and overall, it seems like a good, solid beginning.

As far as I can make out, it’s testing against a very broad, “are there any tags in common at all?” sort of filter, and then giving me the most recent posts in the list. In cases where random search engine traffic lights on an old post, the links displayed will potentially lead visitors into more recent posts. This is good, as far as it goes.

The broadness of the positives, however, in combination with the ranking by descending ID number (if that’s what it is) and a set maximum number of links, gives a very constricted set of results.

This is partly due to the way my tags have grown. When I first migrated into WordPress, I used the Categories as if they were Tags, and created over 1,000 of them. Even with a collapsing Category tree, this was unsatisfactory, so in comes Ultimate Tag Warrior (the mightiest WordPress plug-in I’ve ever used, and please, Christine — can has a 2.3 version?). All of the old Categories became Tags. I also added the Categories of each new post as Tags automatically.

Long story short: many of my tags are also Categories, and most of the vintage (pre-WordPress) posts are only tagged with the old Category names I first assigned to them. If I had a spare life in which to do it, I’d go back through all the posts and review the tags, but I don’t. So, I got to wondering how the Related Posts plug-in could be made more cleverer.

Primarily, the plug-in needs to sort the related candidates more intelligently. How about ranking links based on how many tags they have in common with the current post? I would like to see links to any post that has more than, say, two tags in common with the subject, and then however many, up to a maximum total, which have two or fewer tags in common.

It should also be possible to have the plug-in disregard (or maybe score lower) any tags which are also Categories. This would shift the focus onto less generic tags, and a greater likelihood of close relevance.

A-and wouldn’t it be kind of cool if this soon-to-become-sentient-at-this-rate plug-in were to notice when a number of candidate links were tagged with a term that is also a Category, and offer a link to the Category-filtered page, rather than simply list the most recent posts in that Category?

If one was to get all AJAXy, one might also imagine a candidate check-box list of posts in the post edit screen (or maybe in the preview page?) where one might specifically include or exclude links from a suitably ranked list of recommendations?

I have to hold my hand up to being less than a rank amateur at PHP, but it seems to me that something like this shouldn’t present any too many serious problems. Don’t make me learn to PHProperly and write the thing myself!

As always, comments are most welcome — especially from anyone who can explain convincingly why this isn’t going to work, as it might save a lot of futile botheration.

Posted in Dev | Tagged , , , , , , , , | 2 Comments

2 Responses to notes on the Related Posts plug-in

  1. Mosey says:

    Interesting concept actually! I’m going through the comments on the new ’2.3 related posts plugin’ and I really hope to see that the (amazing!) new author who is “continuing’ the greatness of Related Posts has taken your thoughts on board. :) I’m also seriously considering ‘Similar Posts’ as well! Definitely with you on a 2.3-compatible version of UTW though! :)

  2. pilgrim says:

    Admittedly, I did first take a first look at your comment when I had just staggered out of bed, but even so, it took me quite a few turns through, before and after coffee, before I managed to parse it.

    It didn’t help that we had a bunch of “related to the ‘related posts’ posts” to contend with. At first I thought that’s what you must be talking about.

    Sadly, however, you are correct: the author of the previous posts had little to impart on the subject at hand, writing, as he was, without the benefit of foresight. Bummer.

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>