Usage:<?php echo words_in_post(); ?> Version: 1.1 Author: Lee Sonko Author URI: http://lee.org/ */ function words_in_post() { global $wpdb, $id; $words = $wpdb->get_results("SELECT post_content FROM $wpdb->posts WHERE id = $id"); if ($words) { foreach ($words as $word) { $post = strip_tags($word->post_content); $post = explode(' ', $post); $count = count($post); } } else { $totalcount=0; } $words_in_post = number_format($count); return $words_in_post; } ?>