WP Manifestindependent plugin directory
manifest / content / pnncle-read-time

Read Timer Plus

Adds a Read Timer for WordPress content like post and pages.

by PNNCLE: CODE LAB · github.com/pnncle-elia/pnncle-read-time · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/pnncle-elia/pnncle-read-time/archive/refs/heads/main.zip

Read Timer Plus - WordPress Plugin

A simple WordPress plugin that dynamically calculates and displays reading time for blog posts. Fully compatible with Elementor templates and loop templates.

Features

  • ✅ Automatically calculates reading time based on post content length
  • ✅ Stores reading time as post meta for fast retrieval
  • Elementor Custom Widget - Drag & drop widget in Elementor panel
  • ✅ Elementor Dynamic Tag support (Elementor Pro)
  • ✅ Elementor Meta Widget support (works in Loop templates)
  • ✅ REST API integration for Elementor
  • ✅ Shortcode support for manual display
  • ✅ Configurable reading speed (default: 200 words per minute)
  • ✅ Full styling controls in Elementor

Installation

  1. Upload the read-timer folder to /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. The plugin will automatically calculate reading time for all existing posts on activation

Usage

In Elementor Post Templates

Method 1: Using Custom Widget (Recommended - Works with Free & Pro)

  1. Edit your Elementor Post Template or Loop Template
  2. In the Elementor panel, search for "Reading Time" widget
  3. Drag and drop the Reading Time widget into your template
  4. Customize the display format, prefix, suffix, and styling in the widget settings
  5. The reading time will be displayed automatically

Widget Options:

  • Display Format: Choose between "Formatted" (e.g., "5 min read") or "Number Only" (e.g., "5")
  • Prefix Text: Add text before the number (only when using "Number Only" format)
  • Suffix Text: Add text after the number (only when using "Number Only" format)
  • Style Controls: Full typography, color, and alignment controls

Method 2: Using Dynamic Tag (Elementor Pro Required)

  1. Edit your Elementor Post Template
  2. Add a Text or Heading widget
  3. Click on the widget content area
  4. Click the Dynamic Content icon (database icon)
  5. Select Reading Time from the dynamic tags list
  6. Choose format (Formatted or Number Only)
  7. The reading time will be displayed automatically

Method 3: Using Meta Widget (Works in Loop Templates)

  1. Edit your Elementor Post Template or Loop Template
  2. Add a Meta widget
  3. In the Meta widget settings, select Custom Key
  4. Enter the meta key: _reading_time_formatted
  5. The formatted reading time will be displayed (e.g., "5 min read")

For raw minutes (just the number), use meta key: _reading_time

Using Shortcode

You can display reading time anywhere using the shortcode:

[reading_time]

With custom class:

[reading_time class="my-custom-class"]

For a specific post:

[reading_time post_id="123"]

Using PHP Functions

In your theme templates or custom code:

// Get reading time in minutes (integer)
$minutes = get_reading_time();

// Get formatted reading time (string)
$formatted = get_reading_time_formatted();

// For a specific post
$minutes = get_reading_time(123);
$formatted = get_reading_time_formatted(123);

Customization

Change Reading Speed

By default, the plugin uses 200 words per minute. You can change this using a filter:

add_filter('read_timer_words_per_minute', function($wpm) {
    return 250; // Change to 250 words per minute
});

Add this to your theme's functions.php file.

How It Works

  1. When a post is saved, the plugin:

    • Strips HTML tags and shortcodes from the content
    • Counts the words
    • Calculates reading time (words ÷ reading speed)
    • Stores it as post meta (_reading_time)
  2. The reading time is available through:

    • Elementor Custom Widget (drag & drop - works in all templates)
    • Elementor Dynamic Tags (Elementor Pro)
    • Elementor Meta Widget (in Loop templates)
    • REST API (for Elementor)
    • Shortcodes
    • PHP functions

Meta Keys

The plugin stores reading time in two meta fields:

  • _reading_time - Raw minutes (integer)
  • _reading_time_formatted - Formatted string (e.g., "5 min read")

Requirements

  • WordPress 5.0 or higher
  • PHP 7.2 or higher
  • Elementor (free version works for Custom Widget and Meta Widget)
  • Elementor Pro (optional - only needed for Dynamic Tags feature)

Support

For issues, questions, or contributions, please open an issue on GitHub.

License

GPL v2 or later