It's no big problem to build a list item - exactly therefore are the $before_title/$after_title variables used:
Code:
<?php
if (function_exists('random_posts')) {
// If you print outs the necessary HTML code inside this piece of code,
// then the following header is only printed, if the "Random Posts" plugin
// is activated (comfortable, isn't it? ;) )
// Print out the header of this part of your sidebar with <h2> or <p>-tags
// (depends on your used template):
printf("<h2>Theoretically related posts</h2>");
// Print out the starting <ul>-tag to start a list:
printf("<ul>");
// Parameters for the following function random_posts:
// $limit - No. of posts to show.
$limit = 5;
// $len - Lenght of auto-generate excerpt.
$len = 100;
// $before_title - Text to appear before the entry title.
// each random post should included within a <li>...</li>-tags
$before_title = '<li>';
// $after_title - Text to appear after the entry title.
$after_title = '</li>';
// $before_post - Text to appear before the entry excerpt.
$before_post = '';
// $after_post - Text to appear after the entry excerpt.
$after_post = '';
// $show_pass_post = Include/exclude password protected entries (Default: false).
$show_pass_post = false;
// $show_excerpt = Show/hide excerpt (Default: false).
$show_excerpt = false;
// Execute the function random_posts to display
// a configurable list of random posts.
random_posts($limit, $len, $before_title, $after_title, $before_post, $after_post, $show_pass_post, $show_excerpt);
// Print out the closing </ul>-tag to close the list:
printf("</ul>");
}
?>
Regards,
Remi
Bookmarks