Show Estimated Reading Time at Post Meta

Want to tell your readers how long it will take an article to read completely? Insert the following code into the right file (e.g., single.php or page.php) in the right place (above post meta and below post title) in your theme. It counts total words in an article and calculates time by estimating that on average a reader can read 200 words in a minute.

<?php
$mycontent = $post->post_content;
            $word = str_word_count(strip_tags($mycontent));
            $m = floor($word / 200);
            $s = floor($word % 200 / (200 / 60));
            $est = $m . ' minute' . ($m == 1 ? '' : 's') . ', ' . $s . ' second' . ($s == 1 ? '' : 's');
?>

Looking for more? Try my newsletter

  • Followed by 9100+ incredible folks
  • Regular tips on blogging, marketing, business and learning
  • Ocassional freebies and hot deals
  • Access to the exclusive articles and assets
  • Bonus: 20+ e-books and templates

First time here? Try these resources...

  1. Best VPN Services
  2. Best WordPress Hostings
  3. Best WordPress Themes
  4. Best WordPress Plugins
  5. Best Gutenberg Block Plugins
  6. Best Email Marketing Plugins
  7. Best WordPress Caching Plugins
  8. Best WooCommerce Plugins
  9. Email Marketing Guide for Beginners
  10. Best Small Business Apps
  11. Best Business Name Generators
  12. Top Plagiarism Checkers
  13. Free Web Hosting Services
  14. Best Online Businesses to Start
  15. Best Online Course Platforms
  16. Best Online Casinos in India
  17. Best Affiliate Marketing Programs
  18. More Resources...
Gaurav Tiwari

Looking for more? Try my newsletter

  • Followed by 9100+ incredible folks
  • Regular tips on blogging, marketing, business and learning
  • Ocassional freebies and hot deals
  • Access to the exclusive articles and assets
  • Bonus: 20+ e-books and templates