title: WordPress numberposts not working
body: <p>I am new to wordpress. I have a problem in posts. I want to show latest 4 posts of a category on the home page, but it is displaying the 5 post, as i have added 5 posts.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>        &lt;div id="from-categories" class="clearfix"&gt;     
          &lt;?php 
          $catName='HomePost';              
          $cat_ID=get_cat_ID($catName);             
          $args = array( 'numberposts' =&gt; 4, 'post_status' =&gt; 'publish', 'post_type' =&gt; 'post', 'orderby' =&gt; 'post_date', 'category' =&gt; $cat_ID);              
          $postslist = get_posts( $args );                  
          foreach ($postslist as $post) : setup_postdata($post); ?&gt;       
          &lt;div class="recent-cat"&gt;            
              &lt;h4 class="title"&gt;&lt;?php the_title(); ?&gt;&lt;/h4&gt;            
              &lt;p&gt;&lt;?php the_excerpt(); ?&gt; &lt;/p&gt;                         
              &lt;a href="&lt;?php the_permalink(); ?&gt;" class="readmore"&gt;Read More&lt;/a&gt;          
          &lt;/div&gt;      
  
          &lt;?php endforeach; ?&gt;            
          &lt;/div&gt; &lt;!-- end #from-categories --&gt;                                                            
  </code></pre>
  
  <p>Please let me know what is wrong with this code.
  Thanks in advance.</p>