I am having trouble limiting the number of recent posts to 5. I tried modifying the code without any success. Any ideas? If you have something smart to say, go fuck yourself! Thanks in advance for your help.
<li class="posts"><h2>Recent Posts</h2>
<ul>
<?php
global $opt;
$recentposts = new WP_query();
$recentposts->query('showposts='.$opt['posts'].'&orderby=date&order=DESC&limit=5');
?>
<?php while ($recentposts->have_posts()) : $recentposts->the_post(); ?>
<li><div class="r_time"><?php the_time('d F Y'); ?></div><h1 class="r_head"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1></li>
<?php endwhile; ?>
</ul>
</li>
<li class="posts"><h2>Recent Posts</h2>
<ul>
<?php
global $opt;
$recentposts = new WP_query();
$recentposts->query('showposts='.$opt['posts'].'&orderby=date&order=DESC&limit=5');
?>
<?php while ($recentposts->have_posts()) : $recentposts->the_post(); ?>
<li><div class="r_time"><?php the_time('d F Y'); ?></div><h1 class="r_head"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1></li>
<?php endwhile; ?>
</ul>
</li>