Related Posts with UTW

Patrick Schaber just dropped me an email asking me which related posts plugin I am using. Actually I am using one of the functions of the Ultimate Tag Warrior plugin to make the list.

The list was becoming a little unwieldy with the number of related posts, so I have cleaned up the simple code, added some error trapping, and here it is.

<?php if(function_exists('UTW_ShowRelatedPostsForCurrentPost')) { ?>
<h2>Related Posts:-</h2>
<ul class="utwrelposts"><?php UTW_ShowRelatedPostsForCurrentPost("posthtmllist" , "" , "10"); ?></ul>
<?php } ?>

Be careful on the quotes, as I still haven’t worked out why they are not appearing correctly under WP2.1

Using Ultimate Tag Warrior for controlling related posts means that you are not having to rely on a 3rd party algorithm to define what is related, although by limiting the number of related entries as I am now doing to 10, UTW seems to pick the most related posts fairly well.

Liked this post? Follow this blog to get more. Follow


  1. says

    Andy, seems like Ive found a handy place to pop by and read up on handy little WP Plugins too :D

    Speaking of which, mind sharing which one you use for your display php code plugin?

  2. says

    ig syntax highlighter

    The problem is it seems to be buggered atm – it used to get quotes correct, but with 2.1 there seems to be a problem

  3. says

    I am busy hacking all my header stuff, and theme atm, and then I will be posting the code I am using.

    I have a sitewide “Andy Beard – Niche Marketing” for home in the sidebar, so a followable heading there didn’t really matter so much – I do need to switch some of my headings around, and oyu will see some dynamic stuff there soon.