Adding Estimated Read Time to a WordPress Post

Ever since Medium popularized the concept of the read times on articles, I’ve been seeing it as a design element in more WordPress projects.

Getting a great estimate for average read time is complicated, but if you just need a blunt tool for calculating it, you can use:

amount of words in the post / average reading speed

According to Medium, people read about 275 words per minute. Medium also adds 12 seconds for each inline image, but I didn’t get that fancy.

Here’s the snippet:

https://gist.github.com/devinsays/cd6b089dd2f138bcf668d5f938e38dbf#file-estimate-read-time-php

To output the read time in your post, use something like this:

https://gist.github.com/devinsays/cd6b089dd2f138bcf668d5f938e38dbf#file-output-php

If you prefer to use a plugin, there’s a few around. This snippet is mostly borrowed code from Reading Time WP, which is also on GitHub.

Comments

2 responses to “Adding Estimated Read Time to a WordPress Post”

  1. Yes, this is the plugin am looking for. Thanks for discovering it!

  2. Thank you! That’s work for me :D

Leave a Reply

Your email address will not be published. Required fields are marked *