Read Time


Display a how long it will take the average user to read your content. The value can be provided in the form of a string, array, matrix field or whole entry.

Examples

String

{% set value = 'Mizzen run a shot across the bow fore lateen sail pink Sea Legs provost loot marooned mizzenmast.' %}
or
{% set value = entry.plainTextField %}

{{  value|readTime  }}

Returns: 5 seconds

Array

{% set array = [
    'Mizzen run a shot across the bow fore lateen sail pink Sea Legs provost loot marooned mizzenmast.',
    'Shiver me timbers carouser grog hulk wench weigh anchor Sail ho Chain Shot wherry booty.'
] %}

{{  array|readTime  }}

Returns: 9 seconds

Matrix Field

{% set matrix = entry.matrixField.all() %}

{{  readTime(matrix)  }}

Returns: 1 minute, 58 seconds

Whole Entry

{{  readTime(entry)  }}

Returns: 4 minutes, 25 seconds

Disabling Seconds

Seconds are included by default, but can be disabled like so:

{{ value|readTime(false) }}

or

{{ readTime(entry, false) }}

Free

Package Name

To install this plugin, search for its package name on the Plugin Store and click “Install”.


Information

Report an issue