if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'related', 'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">', 'after_widget' => '</li>', 'before_title' => '<h2 class=\"widgettitle\">', 'after_title' => '</h2>', ));
<ul> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('related') ) : ?> <?php endif; ?></ul>
http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/
You'll need to create an extra sidebar module to use the widget only in single.php. Here's the easy way....
Add this to your functions.php file.
if ( function_exists('register_sidebar') )register_sidebar(array('name'=>'related',
'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',
'after_widget' => '</li>',
'before_title' => '<h2 class=\"widgettitle\">',
'after_title' => '</h2>',
));
then add this to single.php where you want the widget to appear.
Choose 'related' from the drop down menu in Themes->Appearance->Widgets and add the 'related posts' widget to that sidebar module.
Sorted!