Prolific for WordPress

Calculates the weblog-wide word count and writes it to a file each time you publish a new post

Installation and Implementation

  1. Unzip the plugin file (v1.1) into your /wp-content/plugins/ directory.
  2. Open the file in your favorite text editor, locate the $file variable, and set it to the absolute path of the file you want to use to hold the value of the word count.
  3. Activate the plugin from the WordPress admin panel; now, each time you publish a new post, the file will be updated with the new word count.
  4. To use this value in a web page, simply insert the following code where you want the number to appear; note that you are going to need to change the path so that it matches the path you specified above in step two.
<?php $file = '/path/to/your/file'; 
$fh = fopen($file, 'r') or die('could not open file!'); 
$data = fread($fh, filesize($file)) or die('could not read file!'); 
echo $data; 
fclose($fh); ?>

Support

Hopefully you won't experience any problems, but feel free to e-mail me if you do.