Related post plugin Need Help
-
hi
i am using http://www.w-a-s-a-b-i.com/archives/2006/02/02/wordpress-related-entries-20/
plugini activated and pasted this code in side bar
<?php related_posts(5, 10, '
<li>', '</li>
', '', '', false, false); ?>but i got error
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1]
SELECT ID, post_title, post_content,MATCH (post_name, post_content) AGAINST (’hello world’) AS score FROM wp_posts WHERE MATCH (post_name, post_content) AGAINST (’hello world’) AND post_datei tried in other my blog too in different server i get same error , do the code is error which is in side bar ?
-
Suppose you simplify things a bit. here’s how I use it:
<ul>
<?php related_posts(); ?>
</ul>and it works fine. Try that, using default parms, and see if it works so we know if the issue is with your parms or the plugin.
handysolo
its work fine liek to know i want to show only in sigle page not in home page what should i do ?
Does your theme have a single.php? If so, only add it there.
If your theme doesn’t have a single.php, perhaps create one (copy index.php is one easy way to go about it).
if i do so will it appear in side bar ? i want to display in side bar and only in single post
This is so much easier when we can see the site…
So, if you just want it in the side bar for single view only, then ignore my previous post.
Instead, read up on Conditional_Tags like
is_single(). You’d use that in your sidebar around the block of code to show related posts.I don’t recall if this plugin needs to be in The_Loop or not, so you may have some challenges there.
if (is_single())
{
<?php related_posts(); ?>
}above code is right ?
domain :www.xinfo.us
Still not able to complete need help to show related post only viewing single post
The topic ‘Related post plugin Need Help’ is closed to new replies.