How to Display Estimated Post Reading Time in Your WordPress Posts
Keeping readers engaged on a website is as much about managing expectations as it is about producing quality content. One of the simplest and most effective...
Keeping readers engaged on a website is as much about managing expectations as it is about producing quality content. One of the simplest and most effective ways to do this in a WordPress site is by showing how long a post will take to read. A clear, visible estimated reading time helps visitors decide whether to dive in now or bookmark your content for later, ultimately improving user experience and potentially boosting on-page SEO metrics like time on page and lower bounce rates.
Why Estimated Reading Time Matters
Adding an estimated reading time to posts may seem like a small enhancement, but it has a measurable impact on usability and engagement. When someone lands on a blog article, they instinctively want to know how much time they need to commit. Giving them this information upfront signals respect for their time.
From a broader SEO and UX perspective, displaying reading time can:
- Improve engagement by reducing uncertainty and encouraging readers to start reading.
- Increase scroll depth because readers feel more confident they can finish the article.
- Support content strategy by helping you categorize posts into “quick reads” and “deep dives.”
- Enhance perceived professionalism by showing attention to detail on your site.
Whether you manage a technical blog, a magazine-style publication, or a niche content site, integrating a reading time indicator is a quick win that aligns well with modern content consumption habits.
How Reading Time Is Calculated
Before implementing the feature, it helps to understand how reading time is typically calculated. Most tools and platforms follow a simple model based on words per minute (wpm).
Common Calculation Method
The general formula looks like this:
Estimated Reading Time (minutes) = Total Word Count ÷ Average Reading Speed
Commonly used average reading speeds are:
- 200–250 words per minute for general audiences.
- 180–200 words per minute for dense technical or academic content.
From a practical standpoint, most WordPress implementations use a default of around 200–250 wpm, rounding up to the nearest whole minute. For example:
- 500 words ≈ 2–3 minutes
- 1,000 words ≈ 4–5 minutes
- 2,500 words ≈ 10–13 minutes
When you implement this yourself, you can adjust the assumed reading speed to better match your audience and content complexity.
Option 1: Using a Plugin to Display Reading Time
For most site owners, using a dedicated plugin is the fastest and safest approach, especially if you prefer a no-code solution. A plugin handles word counting, caching, and display, and often supports extra features such as icons, labels, or integration with custom post types.
Typical Features of Reading Time Plugins
While plugins differ, many of them offer similar capabilities:
- Automatic reading time calculation for posts and pages.
- Configurable average reading speed (e.g., 200–250 wpm).
- Customizable output text such as “X min read” or “Reading time: X minutes.”
- Support for shortcodes and Gutenberg blocks.
- Options to include or exclude certain content types.
- Styling options that blend with your theme.
How to Implement Reading Time with a Plugin
The exact steps depend on the plugin you choose, but the workflow usually looks like this:
- Install and activate the plugin from the WordPress plugin repository.
- Open the plugin’s settings page in the admin area.
- Set your preferred average reading speed in words per minute.
- Customize the label text (for example, “Estimated reading time: %time% minutes”).
- Choose where to display it (above the title, below the title, before content, after content, or via shortcode).
- Save the settings and preview a post on the front end.
Many plugins also provide a shortcode that you can insert into Gutenberg using a Shortcode block. This gives you fine-grained control over exactly where the reading time appears in each post layout.
Option 2: Adding Reading Time with Custom Code
If you prefer to avoid additional plugins or want full control over the output, you can add a custom reading time function directly to your theme or child theme. This approach is ideal for developers or advanced users who are comfortable editing theme files and keeping code changes under version control.
Where to Put the Code
To keep your changes update-safe, use one of the following locations:
- Child theme’s functions.php: Recommended if you manage your own theme and already use a child theme.
- Site-specific plugin: A good option if you frequently change themes and want to keep custom functionality portable.
Adding code directly to a parent theme’s functions.php is discouraged, as the code will be lost when the theme is updated.
Core Function to Calculate Reading Time
Below is an example PHP function that calculates the estimated reading time based on the post content. It uses a default reading speed of 200 words per minute but lets you adjust this value.
<?php
/**
* Calculate estimated reading time for a post.
*
* @param int|\WP_Post|null $post Optional. Post ID or WP_Post object. Defaults to global $post.
* @param int $wpm Optional. Words per minute. Default 200.
*
* @return string Human-readable estimated reading time.
*/
function mytheme_get_reading_time( $post = null, $wpm = 200 ) {
$post = get_post( $post );
if ( ! $post ) {
return '';
}
// Get content and strip tags/shortcodes.
$content = strip_shortcodes( $post->post_content );
$content = wp_strip_all_tags( $content );
// Count words.
$word_count = str_word_count( $content );
if ( 0 === $word_count ) {
return '';
}
// Calculate minutes (round up).
$minutes = ceil( $word_count / max( 1, (int) $wpm ) );
// Localizable output with singular/plural support.
if ( 1 === $minutes ) {
$time_text = sprintf( _n( '%s minute read', '%s minutes read', 1, 'textdomain' ), $minutes );
} else {
$time_text = sprintf( _n( '%s minute read', '%s minutes read', $minutes, 'textdomain' ), $minutes );
}
return $time_text;
}
?>
This function:
- Accepts a post ID or defaults to the current global post.
- Strips HTML tags and shortcodes for a clean word count.
- Uses
ceil()to round up reading time (so 4.1 minutes becomes 5 minutes). - Returns a translatable string that is ready for localization.
Displaying the Reading Time in Your Theme
Once the calculation function is in place, you need to output it in your theme templates, typically near the post title or meta information. For example, in a block theme, you may create a template part using theme.json and block templates, but with classic themes you’d edit files like single.php or content-single.php.
Here is a basic example using classic template PHP:
<?php
// Inside the WordPress Loop, for example in single.php
$reading_time = mytheme_get_reading_time();
if ( $reading_time ) : ?>
<p class="reading-time"><?php echo esc_html( $reading_time ); ?></p>
<?php endif; ?>
If you are working with a block theme and prefer not to modify PHP templates directly, you can still add the reading time by creating a small block-based pattern that includes a Shortcode block or a custom block that calls the function.
Using a Shortcode for Flexible Placement
To make the reading time easily accessible from within any post or block pattern, you can wrap the function in a shortcode:
<?php
/**
* Shortcode: [reading_time]
*/
function mytheme_reading_time_shortcode( $atts ) {
$atts = shortcode_atts(
array(
'wpm' => 200,
),
$atts,
'reading_time'
);
$wpm = (int) $atts['wpm'];
$reading_time = mytheme_get_reading_time( null, $wpm );
if ( ! $reading_time ) {
return '';
}
return esc_html( $reading_time );
}
add_shortcode( 'reading_time', 'mytheme_reading_time_shortcode' );
?>
Once this shortcode is registered, you can:
- Insert a Shortcode block in Gutenberg and type
[reading_time]. - Adjust the reading speed per use with
[reading_time wpm="220"]if needed. - Include it in reusable block patterns to show consistent meta information across all posts.
Hooking into Content Automatically
If you prefer to automatically append the estimated reading time to every post without manually adding a shortcode, you can hook into the_content filter. This is useful for sites with many existing posts where manual work is impractical.
<?php
/**
* Prepend reading time to post content.
*
* @param string $content Post content.
*
* @return string Modified content.
*/
function mytheme_prepend_reading_time_to_content( $content ) {
if ( ! is_singular( 'post' ) || ! in_the_loop() || ! is_main_query() ) {
return $content;
}
$reading_time = mytheme_get_reading_time();
if ( ! $reading_time ) {
return $content;
}
$output = '<p class="reading-time">';
$output .= esc_html( $reading_time );
$output .= '</p>';
return $output . $content;
}
add_filter( 'the_content', 'mytheme_prepend_reading_time_to_content' );
?>
This code ensures the reading time appears only on single posts in the main query and avoids duplication in secondary loops or widgets.
Styling the Reading Time Display
Once the functionality is in place, the next step is making it visually consistent with your theme. Even minimal styling can significantly improve readability and alignment with your design system.
Basic Styling with Theme CSS
Using the example class .reading-time from the previous snippets, you can add basic styling to your theme’s stylesheet or customizer:
.reading-time {
font-size: 0.9em;
color: #666666;
margin-bottom: 0.75rem;
}
You can also pair reading time with other post meta, such as publication date or author name, using flex or grid layouts in your theme CSS so that it appears as part of a cohesive metadata section.
Adding an Icon or Label
A small icon or label helps the reading time stand out without being intrusive. Even if you prefer a text-only layout, using a short label like “Reading time:” is helpful for accessibility and clarity.
For example, you can adjust the PHP output:
<p class="reading-time">
<span class="reading-time-label">Reading time:</span>
<?php echo esc_html( $reading_time ); ?>
</p>
And then define CSS:
.reading-time-label {
font-weight: 600;
margin-right: 0.25rem;
}
This pattern keeps the markup semantic and accessible while visually differentiating the label from the dynamic time value.
SEO and UX Considerations
Although adding an estimated reading time is primarily a user experience enhancement, it can indirectly contribute to better search performance when implemented thoughtfully across your posts.
Impact on Engagement Metrics
Search engines consider user signals such as:
- Time on page and session duration.
- Bounce rate and return-to-SERP behavior.
- Scroll depth and interaction with on-page elements.
By informing visitors upfront about how long an article will take to read, you reduce the risk of them bouncing immediately due to uncertainty or perceived length. Consistent use of this feature across your WordPress posts can encourage readers to commit to content, which often results in longer dwell time and deeper engagement.
Placement and Readability
To get the most benefit from this feature:
- Place it near the top of the post, usually near the title or just above the content, so people see it before they start reading.
- Keep the wording concise, such as “5 minute read” or “Reading time: 5 minutes.”
- Use consistent styling across the entire site to avoid confusing readers.
- Ensure accessibility by using clear text (not just icons) and sufficient color contrast.
For sites with multilingual content, make sure your strings are translatable so the reading time output appears correctly in each language version.
Testing and Fine-Tuning
After implementing reading time, monitor analytics to see whether there are improvements in user behavior. You can test:
- Different label formats (“X min read” vs “Reading time: X minutes”).
- Alternate placements (above title vs beneath meta vs sidebar).
- Different average reading speeds for technical vs casual blogs.
Combining this with other enhancements like a table of contents, clear headings, and optimized typography will further improve content consumption and retention.
Conclusion
Adding an estimated reading time indicator to WordPress posts is a small change that delivers outsized benefits to readers and site owners alike. It sets expectations, respects visitors’ time, and can positively influence engagement metrics that support better overall SEO performance.
Whether you prefer a plug-and-play solution via a dedicated plugin or a custom-coded approach that integrates directly with your theme, the implementation is straightforward. By calculating reading time from your content, displaying it prominently near the beginning of each article, and styling it consistently, you create a smoother reading experience that keeps visitors on your site longer and encourages them to explore more of your content.