1. Home
  2. /
  3. Web Design & Development
  4. /
  5. WordPress
  6. /
  7. How to Calculate Read Time of an Article or Textual Content? And, Implement It on a Website or WordPress Site?

How to Calculate Read Time of an Article or Textual Content? And, Implement It on a Website or WordPress Site?

How to Calculate Read Time of an Article or Textual Content

When it comes to online content, readability is key. As a website or blog owner, it’s important to not only create high-quality content, but also to present it in a way that is easy for your audience to consume. One way to do this is by providing an estimate of the read time for each article or piece of content on your site. This not only helps readers plan their time accordingly, but it also helps them quickly identify which pieces of content they can read in a short amount of time versus those that will take longer to read. In this article, we’ll explore the how to calculate read time and way to apply it on the website.

In this example, we are going to learn how to calculate read time of an article or blog and implement it on a website or WordPress site. Displaying the Read time on an article, add values to the user experience. It helps to make the user aware of the time it may take if they continue reading your content.

What is the Read Time of an Article or Textual Content?

The read time of a textual content is the amount of time it takes for someone to read the content. It can be calculated by dividing the total number of words in the content by the average reading speed, which is typically around 200-300 words per minute.

To calculate read time in minutes, you can use this formula:

Read time (minutes) = (Total number of words / Average reading speed)

For example, if a textual content has 800 words, the read time would be:

Read time (minutes) = (800 / 250) = 3.2

So, it would take about 3.2 minutes for someone to read the textual content.

Keep in mind that this is just an approximation, as actual reading speed can vary depending on factors such as the complexity of the content, the reader’s familiarity with the topic, and their individual reading habits.

Let’s now dive into the ways to calculate read time of a textual content on WordPress website.

Related: How to Implement Infinite Pagination in WordPress?

How to Calculate Read Time of an Article or Content?

Add the below piece of code in WordPress functions.php or your common functions file. At present, we are considering a read time of 180 words per minute. You can change the number as per your need.

<?php 

if (!function_exists('getArticleReadTime')):
	function getArticleReadTime($text){

		/*PHP Round fractions up so the sample text post minimum read time is 1 minute*/
		$readTime = ceil(str_word_count($text)/180);
		if ($readTime == 1){
			$readTime = $readTime . ' Min read';
		}else{
			$readTime = $readTime . ' Mins read';
		}
		return $readTime;
	}
endif;

?>

Related: How to remove or disable comments on a WordPress website?

How to Display Read Time on the Frontend?

Now, to display the read time on the frontend, call the function getArticleReadTime() and pass the content as an argument. Here is an example of how to do so.

<?php 
$content = 'This is the text for which we need to calculate the read time.';
echo getArticleReadTime( $content );
?>

In WordPress, we can use the below piece of code to get the read time of the content fetched through get_the_content function.

<?php 
$content = get_the_content();
echo getArticleReadTime( $content );
?>

If you think you’re getting more read time than it should be. You should consider stripping all the html tags and make sure you’re supplying only plain text to getArticleReadTime() function. Here is the example of the same.

<?php 
$content = wp_strip_all_tags( get_the_content() );
echo getArticleReadTime( $content );
?>

Thats it! You’re done 🙂

Related: How to implement Next and Previous article navigation link with title?

Benefits of Applying Reading Time on a Website

There are several benefits to applying a reading time estimate on your website:

1. Improved user experience

By providing a reading time estimate, you allow your readers to plan their time accordingly and make informed decisions about which pieces of content they want to read. This improves their overall experience on your website.

2. Increased engagement

If readers know that a piece of content will only take a few minutes to read, they may be more likely to engage with it. This can lead to increased engagement and more time spent on your website.

3. Better content curation

By providing a reading time estimate, you can also help readers quickly identify which pieces of content they can read in a short amount of time versus those that will take longer to read. This can help them to curate their reading list and make the most of their time.

4. Increased social sharing

If readers know that a piece of content will only take a few minutes to read, they may be more likely to share it on social media.

5. Better SEO

By providing useful information to users, you can increase the chances of them staying on your site for a longer period of time which can increase the time on site metric for SEO.

6. Better Content Planning

By providing a reading time estimate, you can also help authors and editors to plan the content accordingly, making sure that the content is not too short or too long for the readers.

Therefore, providing a reading time estimate on your website can improve the user experience, increase engagement, and help readers make the most of their time, thus providing a better experience on your website.

Related: How to enable cc field in Gravity form email notifications?

Conclusion

In conclusion, providing a reading time estimate on your website can greatly improve the user experience and increase engagement. It allows readers to plan their time accordingly and make informed decisions about which pieces of content they want to read. It also helps them quickly identify which pieces of content they can read in a short amount of time versus those that will take longer to read.

Additionally, it allows authors and editors to plan the content accordingly. Make sure that the content is not too short or too long for the readers. Implementing read time estimates on your website or WordPress site is a simple process. It can be done using various plugins or by adding a small piece of code to your website.

By providing this useful information to your readers, you can increase the chances of them staying on your site for a longer period of time and improve their overall experience on your website.

Rate this post
Reviews & Ratings Get your stoe online with Shopify in 60 minutes Shop Now