Hi,
I need to create a function in functions.php that goes through all the posts in a specific category (to display their titles and some related pictures).
I have created the first version of the function like this:
function showPosts($category_name)
{
query_posts('category_name=$category_name&showposts=10');
while (have_posts()) : the_post();
$title = get_the_title();
endwhile;
}
Problem is that nothing is displayed. It looks like the query_posts call fails, but why is that? And what can I do about it?
Thanks,
Mads