Skip to content

Instantly share code, notes, and snippets.

@danemorgan
Created September 14, 2013 05:09
Show Gist options
  • Save danemorgan/6558985 to your computer and use it in GitHub Desktop.
Save danemorgan/6558985 to your computer and use it in GitHub Desktop.
function simplePostsCounter($type, $status) {
if($type == '') {$type = 'post';}
if($status == '') {$status = 'publish';}
$foundResults = wp_count_posts($type);
return $foundResults->$status;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment