title: WordPress: displaying "More posts" button only if number of posts > 3
body: <p><strong>UPDATE</strong> I'm actually trying to display a "More Posts" button only if there are more than 3 posts in the "News" category. The current code that I've come up with after searching Stack Overflow is as follows... but doesn't seem to be functioning properly:</p>
  
  <pre><code>&lt;?php
  $cat = get_query_var('cat');
  $posts = get_posts(array('News' =&gt; $cat));
  if(count($posts) &gt; 3)
  {
   echo('&lt;div class="more-box"&gt;&lt;a href="#"&gt;More news and events&lt;/a&gt;&lt;/div&gt;');
  }
  else
  {
  //CODE EXECUTED IF LESS THAN THREE POSTS EXIST IN CURRENT CATEGORY
  }
  ?&gt;
  </code></pre>
  
  <p>How would display the More Button only if there are >3 posts in <strong>News</strong>?</p>
  
  <p>Thank you!</p>