mww2

Boost User Engagement by Displaying Reading Time in WordPress

Adding an estimated reading time to your WordPress posts enhances user experience by setting clear expectations for readers. It encourages engagement by letting visitors know how much time they’ll need to invest upfront. This simple feature demonstrates consideration while potentially increasing the likelihood of readers staying on your site longer.

Method 1: Using a Plugin (Beginner-Friendly)

The easiest way to show estimated reading time is by using a plugin. It’s fast, reliable, and doesn’t require technical knowledge.

Step 1: Install a Reading Time Plugin

Several plugins offer this feature. A popular and lightweight option is Reading Time WP.

Step 2: Configure Plugin Settings

Once installed:

Step 3: Save and Test

You can style the output using custom CSS for better visual alignment with your theme.

Method 2: Add Manually with Custom Code (Advanced Users)

If you prefer not to use a plugin, you can add reading time manually with a bit of code. This method provides more control and customization.

Step 1: Add PHP Code to Your Theme

function get_estimated_reading_time($post_id = null) {
   if (!$post_id) {
       $post_id = get_the_ID();
   }
   $words_per_minute = 200;
   $content = get_post_field('post_content', $post_id);
   $word_count = str_word_count(strip_tags($content));
   $reading_time = ceil($word_count / $words_per_minute);
   return $reading_time . ' minute read';
}

Step 2: Display Reading Time in Post Template

Insert the reading time where you want it to appear, usually at the top of the post. Edit the single.php or use hooks depending on your theme.

Here’s a sample snippet:

echo '<p>' . get_estimated_reading_time() . '</p>';

Step 3: Style with CSS (Optional)

To make it look cleaner, add this to Appearance > Customize > Additional CSS:

.reading-time {
   font-style: italic;
   color: #555;
   margin-bottom: 10px;
}

Method 3: Use Gutenberg Block Plugin (No Code, More Control)

For those who use the block editor (Gutenberg), another approach is to use a plugin like Kadence Blocks or GenerateBlocks along with a reading time shortcode.

Step 1: Install a Shortcode Plugin

Use a plugin like Shortcoder or Insert PHP Code Snippet to create a shortcode for reading time.

Step 2: Add the Shortcode

Use the same function mentioned earlier, but assign it to a shortcode:

function shortcode_reading_time() {
   return get_estimated_reading_time();
}
add_shortcode('reading_time', 'shortcode_reading_time');

Then, in your post or page, simply insert:

[reading_time]

Step 3: Customize with Block Settings

Gutenberg allows full control of alignment, size, color, and spacing, making this method great for visual customization.

Why Display Estimated Reading Time?

Before diving into the steps, let’s quickly understand the benefits:

Best Practices for Estimated Reading Time

  1. Keep It Visible but Subtle: Place the reading time near the title or above the content, but don’t make it overly dominant. It should serve as a guide, not a distraction.
  2. Match Site Style: Customize the font, size, and placement to blend well with your theme design.
  3. Use Consistent Terminology: Stick to familiar phrases like “2-minute read” or “Reading time: 3 minutes.”
  4. Update Regarding Changes in Content Length: If you significantly update an article, the reading time will adjust automatically (in both plugin and manual methods), but make sure to verify it looks accurate and well-placed.

Optional Add-ons: Icons and Time Estimators

To further enhance visual appeal, consider:

Troubleshooting Tips

Conclusion

Adding estimated reading time to your WordPress posts is a simple yet effective way to improve usability and reader satisfaction. Whether you choose a plugin for quick setup or code it manually for deeper control, the benefits far outweigh the effort. Choose the method that suits your technical comfort level, test it on a few posts, and iterate as needed. Over time, your audience will appreciate the added transparency and readability that this thoughtful feature provides.