I know this is simple, but when i am looking at single.php and an individual post, i want to display the most recent 5 posts in that category. But it obviously has to be dynamic so it knows which category your in, how do i do this?
I have this and it doesn't work; it displays posts from all categories:
$cat = get_query_var('cat');
$myposts = get_posts('numberposts=5&offset=1&category=$cat');