Display posts from a category
You’re doing query_posts and then immediately get_posts. This looks wrong. Remove the query_posts call. Also, where does your $cat come from? It doesn’t appear to be set anywhere in your code snippet. Try to start with setting it first: $cat = get_query_var(‘cat’);