Here’s a related posts plugin I cooked up that will display a list of (possibly) related posts at the bottom of posts. Requires Ultimate Tag Warrior.
Tags: plugin, related posts, tags
Here’s a related posts plugin I cooked up that will display a list of (possibly) related posts at the bottom of posts. Requires Ultimate Tag Warrior.
Tags: plugin, related posts, tags
9 comments
May 28, 2006 at 5:27 am
Larry
Nice, but I have an ‘issue’ with it… Seems that it doesn’t want to use my current permalink structure (I’ve changed it a few times in the past) and I’m unsure how to make it use the correct links. Any clue as to how I can do this?
May 28, 2006 at 5:31 am
ceejayoz
You’ll probably need to ask the Ultimate Tag Warrior author on that one. This plugin doesn’t generate the links, it’s just a wrapper for the UTW function that does.
May 28, 2006 at 5:37 am
Larry
Ah, ok…. thanks for the info.
May 28, 2006 at 5:53 am
Larry
Actually, did I make it clear that it’s not referencing to the correct permalink to the entries? I don’t mean the tags… I mean when I click on a possible related post, it sends me to the entry’s original link structure…
May 28, 2006 at 5:56 am
ceejayoz
The related posts list is generated by the UTW plugin, so any irregularities in permalink structure in those generated links are out of my control.
May 28, 2006 at 5:57 am
Larry
Ok… thanks again. Sorry for the bother.
May 28, 2006 at 6:19 am
Larry
Ok ok… I promise this will be my last post… I did some spelunking around the UTW code, and found what could be the solution.
Your plugin uses “$post->guid” to get the link to the entry… UTW, however, uses this… “get_permalink($post->ID)”.
Replacing the original piece of code with “get_permalink($post->ID)” seems to fix everything.
I’m no PHP wiz, but I hope this will help you out with the related posts plugin :)
May 28, 2006 at 4:21 pm
ceejayoz
Sounds good, thanks. Strange that the GUID wouldn’t match the permalink!
May 31, 2006 at 5:26 am
ceejayoz
Larry,
I’ve released a new version implementing your fix.
Thanks!