title: Show all the posts from a category on a single page in Wordpress
body: <p>I am brand new to php and wordpress.</p>
  
  <p>I use post categories as a simple directory and would like users to see every post from a category when they click on one, as opposed to paginating the results.</p>
  
  <p>In Archive.php that comes with the theme I had tried something like this: </p>
  
  <pre><code>    /* Get the current category and increase the number of posts shown */
      &lt;?php 
      $category = $wp_query-&gt;get_queried_object()-&gt;slug;
      query_posts('category_name=$category&amp;showposts=100'); 
      ?&gt;
  
      &lt;div id="content"&gt;
          &lt;?php if ( have_posts() ) : ?&gt;
          &lt;?php /* The loop */ ?&gt;
          &lt;?php while ( have_posts() ) : the_post(); ?&gt;
              &lt;?php get_template_part( 'content', get_post_format() ); ?&gt;
          &lt;?php endwhile; ?&gt;
          &lt;?php else : ?&gt;
              &lt;?php get_template_part( 'content', 'none' ); ?&gt;
          &lt;?php endif; ?&gt;
      &lt;/div&gt;&lt;!-- /content --&gt;
  </code></pre>
  
  <p>However, it doesn't work. Clicking on the category shows no posts found.</p>
  
  <p>I'm sure there is a much  better and simpler way to go about doing this.</p>
  
  <p>A secondary question would be, what would be a good way to apply this logic only to a subset of categories I have? I suppose I could make an array of categories and query that, but it seems clumsy.</p>
  
  <p>Many thanks.</p>