UPDATE 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:
<?php
$cat = get_query_var('cat');
$posts = get_posts(array('News' => $cat));
if(count($posts) > 3)
{
echo('<div class="more-box"><a href="#">More news and events</a></div>');
}
else
{
//CODE EXECUTED IF LESS THAN THREE POSTS EXIST IN CURRENT CATEGORY
}
?>
How would display the More Button only if there are >3 posts in News?
Thank you!