dane-m
9/14/2013 - 5:07 AM

Get the word count for your Wordpress Posts

Get the word count for your Wordpress Posts

function post_wordcount($postid) {
	$content = get_post($postid);
        $completContent = $content->post_content;
        $wordsCount = count(explode(" ", $completContent)); 
 
        return $wordsCount;     
}