danemorgan
9/14/2013 - 5:09 AM

wp-count-post-by-type.php

function simplePostsCounter($type, $status) {
 
        if($type == '') {$type = 'post';}
        if($status == '') {$status = 'publish';}
         
        $foundResults = wp_count_posts($type);
        return $foundResults->$status;
}