Displaying estimated postDynamic, time-based content (e.g., blog entries) displayed i... More reading time for your pages is a subtle form of courtesy to your readers. It gives them a useful information on the time they will spend reading the pageStatic content (e.g., "About Us," "Contact") not part of chr... More, so they can eventually bookmark it if they don’t have the time to read it right away. Combined with a reading progress bar, you are really providing a much better reading experience for your readers. Let’s see how to display estimated pageStatic content (e.g., "About Us," "Contact") not part of chr... More reading time in WordPress.
As for almost any feature you’d like to include on a WordPress site: there is a pluginSoftware that adds specific features or functionality to a W... More for that. The Read Meter plugin does just what we need and even a little more, it gives you the estimated reading time (including time spent viewing images) and displays a progress bar as you are reading.
Installation is very straightforward, just install it as you would for any other WordPress pluginSoftware that adds specific features or functionality to a W... More, then head to Settings > Read Meter and change the settings to fit your website. You can choose what to include in the time count (images, comments,…) and where to display the time count and progress bar. There is even a shortcodeA small code snippet ([example]) that simplifies adding dyna... More to place the bar very accurately on the site.

The other way, which is not that hard if you are a bit familiar with WordPress, is to use a code snippet that you include in your theme’s functions.php file. This is a bit lighter weight than adding a pluginSoftware that adds specific features or functionality to a W... More just for that functionality, although this function doesn’t go as far as the pluginSoftware that adds specific features or functionality to a W... More mentioned above.
To add the estimated reading time in your postDynamic, time-based content (e.g., blog entries) displayed i... More, simply copy-paste this code in your functions.php file (or in a code snippet pluginSoftware that adds specific features or functionality to a W... More if you use one).
// Main reading time calculation function
function calculate_reading_time($custom_words_per_minute = 200) {
$post_content = get_post_field('post_content', get_the_ID());
if (empty($post_content)) {
return 'Less than a minute';
}
$clean_content = strip_tags($post_content);
$word_count = str_word_count($clean_content);
$reading_time_minutes = max(1, ceil($word_count / $custom_words_per_minute));
// Format with proper pluralization
if ($reading_time_minutes === 1) {
return '1 minute';
} else {
return $reading_time_minutes . ' minutes';
}
}
// Shortcode function
function reading_time_shortcode($atts) {
// Parse shortcode attributes
$attributes = shortcode_atts(array(
'speed' => 200, // words per minute
'prefix' => 'Reading time: ',
'suffix' => ''
), $atts);
// Set custom reading speed if provided
$reading_time = calculate_reading_time($attributes['speed']);
// Return formatted output
return $attributes['prefix'] . $reading_time . $attributes['suffix'];
}
// Register the shortcode
add_shortcode('reading_time', 'reading_time_shortcode');Once this is done, your themeTheme A collection of files that determine a site's design, ... More is ready to include the estimated reading time. Include it using the shortcodes, either directly in your templateTemplate A file in a theme that defines how different parts ... More or in a GutenbergGutenberg The block editor introduced in WordPress 5.0, usin... More block. See the instructions below to understand the shortcodeA small code snippet ([example]) that simplifies adding dyna... More usage and attributes.
<!-- Basic usage -->
[reading_time]
<!-- Custom reading speed (250 words per minute) -->
[reading_time speed="250"]
<!-- Custom prefix and suffix -->
[reading_time prefix="Estimated read: " suffix=" of content"]
<!-- Combined attributes -->
[reading_time speed="300" prefix="⏱️ " suffix=" to read"]As you can see, you can change the reading speed, which is useful considering various language have various average reading speed.