Forums

[resolved] Word Count (5 posts)

  1. thisisedie
    Member
    Posted 2 years ago #

    I asked this question about a year ago and never got an answer so I'm trying again. How would I get the total number of words for the entire blog without a plugin? Thanks.

  2. ClaytonJames
    Member
    Posted 2 years ago #

    If you are talking about doing this from a theme, I actually played with this a little bit. I downloaded the Post Word Count plugin, which by default is designed to show the total word count for all posts. I took the contents of the plugin file itself and pasted it as a function in my themes functions.php file. I then added
    <?php mdv_post_word_count(); ?> to my index.php file and it did indeed show my total ( what I assume to be my actual total ) word count. I imaging you could place it in any template in your theme and then style it as you like. The instructions for per post or all posts word count are in the readme file in the plugin. Talk about quick and dirty. I feel a little like I stole it! :-)

  3. thisisedie
    Member
    Posted 2 years ago #

    Ha, lol. I'm actually using that plugin currently. Is there any benefit to doing it the way you described as opposed to using it as a regular plugin? Aside from minimizing clutter.

  4. ClaytonJames
    Member
    Posted 2 years ago #

    How would I get the total number of words for the entire blog without a plugin?

    That's the only reason I can think of, and the only reason I even mentioned it. My own opinion? Just use the plugin!

    :-)

  5. thisisedie
    Member
    Posted 2 years ago #

    Actually I like your way better. I was just curious if using functions.php might have benefits. Thanks a bunch :o)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.