List all posts in a category with query_post() function
There are two issues here: The use of query_posts() Undefined $pagename variable I assume that you want to use the page slug as the string passed for the category parameter in the query arguments array? You can get that via $post->post_name, like so: global $post; $page_slug = $post->post_name; Then, to pass that as a query … Read more