On an average, We Can Read 200 to 300 Words Per Minute.
You May also Like these:
- Fetch Network Error: Can’t change Jetpack settings
- Want to speed up your WordPress website for more traffic?
- Fix all WordPress errors by five methods completely
For people read about 200 words per minute.
// Calculate Reading Time function epcl_reading_time( $content ) { // Predefined words-per-minute rate. $words_per_minute = 225; $words_per_second = $words_per_minute / 60; // Count the words in the content. $word_count = str_word_count( strip_tags( $content ) ); // [UNUSED] How many minutes? $minutes = floor( $word_count / $words_per_minute ); // [UNUSED] How many seconds (remainder)? $seconds_remainder = floor( $word_count % $words_per_minute / $words_per_second ); // How many seconds (total)? $seconds_total = floor( $word_count / $words_per_second ); if( $minutes < 1){ $minutes = 1; } return $minutes; }
OR use this:
For people read about 200 words per minute.
// Calculate Reading Time function epcl_reading_time( $content ) { // Predefined words-per-minute rate. $words_per_minute = 225; $words_per_second = $words_per_minute / 60; // Count the words in the content. $word_count = str_word_count( strip_tags( $content ) ); // [UNUSED] How many minutes? $minutes = floor( $word_count / $words_per_minute ); // [UNUSED] How many seconds (remainder)? $seconds_remainder = floor( $word_count % $words_per_minute / $words_per_second ); // How many seconds (total)? $seconds_total = floor( $word_count / $words_per_second ); if( $minutes < 1){ $minutes = 1; } return $minutes; }
Then you need to call this function to display on your site, and you can put it anywhere, use something like this:
<?php echo reading_time(); ?>
You may also like these:
- Fix all WordPress errors by five methods completely
- How to Hide Admin Bar without Plugin in just 5 minutes?
- Post Anatomy: The perfect blog posts writing guide in 2020
This returns just a number, so you’ll have to add any context around it in your HTML to put it in context.
GIPHY App Key not set. Please check settings