I did implement a related entries hack that use post slug as searching terms on my site. Maybe you can check it out and see if it’s what you requested for.
related entries
milelu: Your hack is pretty much what I am looking for 😉
What is that caching issue you mention at the end of the post?
Can I place relatedposts() in index.php? I don’t see anything in the code that would prevent me from doing so. Just wondering since you suggest wp-comments.php in your post.
In adam’s post, he mentioned:
… was generating the related list through PHP each time the entry was shown. This caused a problem with database timeouts and he had to put in a caching mechanism.
Of cource you can put the function in index.php. I put it in wp-comments.php so that such list will only show up in single post view.
<?php if ($single) { ?>
relatedposts()
<?php } ?>
Will make sure that the list is only displayed in single entry view. That said the chaching issue worries me a bit (since my SQL datatbase is a bit iffy at times). Do you have a link to Adam’s post?
The wiki also has a few different approaches, including my same_cat hack.
-d