This is a WordPress plugin tweaked from wordpress related entries plugin, it also uses portions of the nice categories plugin to list the related posts - comma separated with 'and' before the last in the same whay that nice categories does with categories.
Example:
Welcome Marshmallow, Marshmallow theme maybe?, to theme or not to theme?, Pompey FC T610 Theme and Milk Theme for T610.
Download plugin code (ZIP file) - should be ok hopefully, but please leave any comments and Ill tweak the code if necessary.
*EDIT:* Ok, code. place ?php nice_related_posts(); ?> >
where you want the list.
you can customise it thuslynice_related_posts($limit=5, $normal_separator = ', ', $penultimate_separator = ' and ', $show_pass_post =false)
$limit is the amount of post to be listed (default is 5), normal_separator whatevers between the posts (default is ',' or comma), penultimate_separator is what appears between the last and penultimate post (defaults to 'and'), show_pass_post is whether or not to show passworded posts.
*For example* ?php nice_related_posts(3, ' or ', ' and finally ', false); ?> >
would result in
post 1 or post 2 and finally post 2
hopefully that helps, but WP mangles code tags so sorry if theres some confusion





I get this error:
Fatal error: Call to undefined function: nice_related_posts() in /home/smallbus/public_html/wp-content/themes/default/single.php on line 14
drop it into wp-content/plugins and then activate it from the plugins pane in your WP admin.
Dropped the file in, activated, and added:
to comments.php in my theme... I am getting the following error followed by a bunch of SQL...
WordPress database error: [Can't find FULLTEXT index matching the column list]
php nice_related_posts($limit=5, $normal_separator = ', ', $penultimate_separator = ' and ', $show_pass_post =false);
Hopefully this will work :)
Id like to be more helpful, but Im afraid I cannot. I have no idea how the plugin works on a technical level, mine is just a tweak from this one, as explained above.
Id suggest trying that and seeing if you get the same problem.
yes, WP doesnt generally like code tags :-(
I think the error has to do something with indexing? I don't understand why it wouldn't work. Are you running it with WP 1.5??
Yup, my blog is 1.5
This needs to be run prior to using the plugin...
ALTER TABLE `wp_posts` ADD FULLTEXT `post_related` (
`post_name` ,
`post_content`
)
I'm up and running, that is just a one time thing... Thanks for your help!!!
Out of curiousity, did you modify version 1.3.3 of the plugin or a prior version?
I think it was the earlier version by the looks of things. Maybe I should release an update .. although it does mean trying to work out what I did to the original plugin again :-(
Yeah, I've run into similar problems with plugins I am working on, perhaps if it is not too much trouble the original plugin writer can implement your code as it seems you have added the option to pass in parameters that make it a little more flexible...
Just my two cents ;)
Thats a good idea, but I think mine is significantly different from the original and I think it might just be best to keep them separate.
As ever with these things though, once theyre installed and running you never encounter problems like yours so it doesnt become something you notice yourself and so have to fix.
Ill certainly look at the latest version of the original plugin though and see if I have hunt down my changes. ;-)
Also is this weird?
Post A lists as related posts, B, C, D.
Post B says No related posts.
Post C has 1 related post, but it's not post A, B, or D...
weird???
My nice related posts says "none" but all three posts are on the same topic.
Question: my WordPress was installed at http://metroeveningnews (without WWW) and I'm wondering if perhaps the Related plugin is looking for With WWW? I ask this because another plugin (live calendar) is working at url without www but not with www.
SHOULD I REINSTALL WORDPRESS AT WWW or do you think that has nothing to do with related not working? It installed successfully but isn't relating. thanks so much!
Im afraid I have _no idea_. sorry.
this plugin is work in WP 2.0??
>this plugin is work in WP 2.0??
Only
[...] 1. Nice Related Post Plugin We all love and use the Related Post Plugin and now its been made a bit better with this tweak. What this tweak does is give a bit more options to your output. Now you can list the related post and have commas and the word ‘and’ before the last one to make the output a bit more reader friendly. via somefoolwitha.com. 2. Nicer Trackbacks What this does is change the look of your trackbacks. Instead of having your trackbacks look like this “[…] Trackback link […]” they come out looking “Trackback link” ‘eh. Pretty nice touch to any WordPress website in my opinion. Also, you should look into fixing the output of your trackback display by changing the style they come out in, and seperating them. All thanks to cre8d. [...]
In order to avoid future posts showing up, I've added a date check:
AND (post_status = 'publish' && ID != '$post->ID' && post_date
[...] The original I’m working with is the tweaked Nice Related Posts plugin for Wordpress, which I’m tweaking further. If you want, I can release the code, assuming I’m ever done. [...]
[...] Turns out - yes. I think El Reg has moved on, and got the machines to do it, and now so have I. I’ve turned on a Wordpress plugin called “related posts” (actually, nice-related-posts, which I’ve tweaked, which is itself based on related-posts). [...]
[...] 1. Nice Related Post Plugin We all love and use the Related Post Plugin and now its been made a bit better with this tweak. What this tweak does is give a bit more options to your output. Now you can list the related post and have commas and the word ‘and’ before the last one to make the output a bit more reader friendly. via somefoolwitha.com. [...]
i get the same error as Tim
Fatal error: Call to undefined function: nice_related_posts() in /home/welchs/public_html/wp-content/themes/default/single.php on line 14
[...] Horne has compiled a list of his 10 mission critical wordpress plugins which mentions my very own Nice Related Posts (a mod of another plugin). I gave a few of them a go: Wordpress Reports gives easy access to Google [...]
[...] Besucher, um sie auf weitere interessante Beiträge im eigenen Blog hinzuweisen. Mit dem Plugin Nice related posts kann man es etwas anders [...]