title: WordPress: How to display only posts that are in a certain category?
body: <p>I'm pretty new to WordPress but have spent some 50 odd hours studying up on it, trying things out and such and have the feeling I got a pretty good handle on it now..</p>
  
  <p>However the one thing I simply cannot get working is to have a page spit out a list of posts of a certain category.</p>
  
  <p>Here is my example: <a href="http://dev.jannisgundermann.com/zoeikin/graphic-design/typographic-posters" rel="nofollow noreferrer">http://dev.jannisgundermann.com/zoeikin/graphic-design/typographic-posters</a></p>
  
  <p>I have a post that if I go to it directly works correctly, but does not show up on this page.</p>
  
  <p><a href="http://dev.jannisgundermann.com/zoeikin/typographic-posters/test-project" rel="nofollow noreferrer">The post direct link.</a></p>
  
  <p>The category id is '3' while the category name is 'typographic-posters'.</p>
  
  <p>I have a custom page template for the typographic-posters page that looks like this:</p>
  
  <pre><code>&lt;?php
  /*
  Template Name: Typographic Posters
  */
  ?&gt;
  
  &lt;?php get_header(); ?&gt;
  &lt;?php get_sidebar(); ?&gt;
  
  &lt;?php if (in_category('3')): ?&gt;
  &lt;div class="post"&gt;
  
      &lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
  
  
    &lt;div &lt;?php post_class() ?&gt; id="post-&lt;?php the_ID(); ?&gt;"&gt;
     &lt;div class="post-description"&gt;
      &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
      &lt;?php the_content(); ?&gt;
     &lt;/div&gt;
     &lt;?=get_image('flutter-image');?&gt;
    &lt;/div&gt;
  
  
      &lt;?php endwhile; else: ?&gt;
       &lt;p&gt;&lt;?php _e('Sorry, no posts matched your criteria.'); ?&gt;&lt;/p&gt;
      &lt;?php endif; ?&gt;
  
  &lt;/div&gt;
  &lt;?php endif; ?&gt;
  
  &lt;?php get_footer(); ?&gt;
  </code></pre>
  
  <p>Using this code however the page only shows gets the header, sidebar and nothing else..</p>
  
  <p>If someone could help me out that would really help me get a handle on this filtering of wordpress categories.</p>
  
  <p>Thanks for reading,</p>
  
  <p>Jannis</p>