Show estimated reading time in WordPress posts

By specifying the estimated reading time, you inform visitors about the length of the article and thus increase the time they spend on your website. In this tutorial I will show you how you can display the reading time in WordPress posts with a plugin or your own function.

The display of the estimated reading time only became really popular with the online publishing platform Medium. Visitors to the website can thus assess the scope of the post right at the beginning and make a decision more easily whether they want to read it.

In addition to the additional convenience for your readers , some bloggers also report that adding the reading time has improved the length of stay and bounce rate of website visitors - another great advantage that speaks for the representation of the reading time.

Calculate the estimated reading time of articles

In the article Read Time and You the calculation of the reading time on medium is explained:

Read time is based on the average reading speed of an adult (roughly 275 WPM). We take the total word count of a post and translate it into minutes. Then, we add 12 seconds for each inline image. Boom, read time.

The average reader creates around 250 to 300 words per minute. Together with the number of words in an article, this results in the following formula for calculating the reading time:

 Lesezeit = Anzahl von Wörter im Beitrag / Durchschnittliche Lesegeschwindigkeit

A little more time can be added for pictures and videos for more precise information.

Show reading time in WordPress with Reading Time WP

There are of course plugins for WordPress that can calculate and display the estimated reading time for us. A very popular plugin for this is Reading Time WP by Jason Yingling.

Reading Time WP calculates an estimated reading time of your posts, which above the content or via ...

By: Jason Yingling

( 14 )
Last updated: 5 months ago
10,000+ active installations
Compatible up to: 5.5.3

The plugin has around 20,000 downloads and is installed on over 4,000 websites. With the latest update to version 1.1.0, images can now also be taken into account when calculating the reading time.

Configure the reading time in the plugin

After installing the plugin you can configure the display of the reading time under Settings → Reading Time WP . The lettering and the number of words per minute can be adjusted.

A value between 250 and 300 is recommended for the reading speed.

Reading Time WP options

The checkboxes can be used to activate the automatic display of the reading time over the content of a post and post extracts. Alternatively, the shortcode [rt_reading_time] can be used to display the reading time anywhere in the content. The parameters of the shortcode are explained directly in the options.

Add reading time in WordPress posts without a plugin

If you want to do without a plugin, you can also display the estimated reading time with your own template function. In my blog, I now display the reading time by date and author in the Postmeta and use the following snippet of code:

 /** * Displays the reading time of a post */ function theme_slug_reading_time( $post = null, $wpm = 275 ) { // Get content and clean it. $content = get_post_field( 'post_content', $post ); $content = strip_tags( strip_shortcodes( $content ) ); // Get word count. $word_count = str_word_count( $content ); // Calculate reading time. $reading_time = ceil( $word_count / $wpm ); return sprintf( esc_html__( 'Reading Time: %s min', 'theme-slug' ), $reading_time ); }

The code is largely based on the calculation from Reading Time WP (link to the function on Github). So I didn't reinvent the wheel and just simplified the calculation a little.

The function can be called within the WordPress loop without specifying parameters; a Post ID or Post Object can be transferred outside the loop. The reading speed can be changed with the second parameter.

The template function can then be used in the template files of the theme:

 <div class="entry-content"> <div class="reading-time"><?php echo theme_slug_reading_time(); ?></div> <?php the_content(); ?> </div><!-- .entry-content -->

What do you think of the estimated reading time display? A useful feature or rather unnecessary? I am happy about your opinion in the comments 🙂