I'm attempting to create a second nav menu on my wordpress site.
I want this to show links to all posts within the current category only.
I've been experimenting with the get_posts function but am struggling to find how to dynamically select the current category. i.e. what to place in here category=x
Any help is greatly appreciated
Here is my template code I have been using
<ul id="catnav">
<?php
global $post;
$myposts = get_posts('numberposts=5&category=1');
foreach($myposts as $post) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>