remi,
I will be using the code on single pages only and showing only the title of the post. I installed the script and pasted in the code - it all worked fine.
However, the formatting of the output doesn't look all that great... Don't need all the "before and after stuff".
I massacred the code a little bit (but left the after title) and it looks a bit closer to what I would like to see.
Question: How would I go about getting each post in a bulleted list - or if it's too tricky; on a line of their own?
A bulleted list like this:
- Post 1
- Post 2
- Post 3
- Post 4
- Post 5
The massacred code now looks like this:
Agains thanks for your help!<p>Theoretically related posts</p>
<?php
if (function_exists('random_posts')) {
// Description:
// The function random_posts displays a configurable list of random posts.
// Parameters:
// $limit - No. of posts to show.
$limit = 5;
// $len - Lenght of auto-generate excerpt.
$len = 0;
// $after_title - Text to appear after the entry title.
$after_title = '..... ';
// $show_pass_post = Include/exclude password protected entries (Default: false).
$show_pass_post = false;
// $show_excerpt = Show/hide excerpt (Default: false).
$show_excerpt = false;
random_posts($limit, $len, $after_title, $show_pass_post, $show_excerpt);
}
?>
Risto
Bookmarks