Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Forum: Plugins
    In reply to: Word count plugin?
    Thread Starter dreamsindigital

    (@dreamsindigital)

    I came across this word count plugin that’s easier than inserting the code, and also gives other information. Although, it counts hyperlinks as well so it’s kind of in accurate. Maybe someone can mode it.

    http://flagrantdisregard.com/wordstats/

    Forum: Plugins
    In reply to: Word count plugin?
    Thread Starter dreamsindigital

    (@dreamsindigital)

    Thanks! It works.

    Forum: Plugins
    In reply to: Word count plugin?
    Thread Starter dreamsindigital

    (@dreamsindigital)

    Thanks, but I’m having a little problem. I’m pasting this after the div:

    <?php
    $countpost = $post->post_content;
    $countpost = preg_replace('/s+/', ' ', strip_tags($countpost)); // remove white space and html
    $words = ((count(explode(" ",$countpost)) + count(explode(".r",$countpost)))-1); // count spaces and periods
    if ($words == 1)
    {
    echo "<p class="note">Post length: ~ $words word
    ";
    }
    else
    {
    echo "<p class="note">Post length: ~ $words words
    ";
    }
    ?>

    …but I get an error that says “Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home/allen/public_html/behindthedreams/wp-admin/edit-form-advanced.php on line 163”

    Any ideas? Thanks

Viewing 3 replies - 1 through 3 (of 3 total)