So, I successfully can get_posts from categories, but what about archives? I need to say IF < = 5 posts in an archive, get this footer. It works for categories, I just need to get the archive. Keep in mind I'm using archive.php, NOT archives.php.
This is the code I used to get posts from a category:
$cat = get_query_var(‘cat’);
$posts = get_posts(array(‘category’ => $cat));