manifest / integrations / wp-graphql-content-stats
WPGraphQL Content Stats
Add some stats to WPGraphQL: total posts, word count and estimated reading time.
by Armand Philippot · github.com/armandphilippot/wp-graphql-content-stats · website
★ 2stars
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/armandphilippot/wp-graphql-content-stats/archive/refs/heads/main.zipFrom the readme
WPGraphQL Content Stats
Add some stats to WPGraphQL: total posts, word count and estimated reading time.
Introduction
This WordPress plugin adds some new fields to WPGraphQL:
- a total field is added to pageInfo: it contains the total of found posts or found users (depending on WPQuery type).
- an info field is added to ContentNode (used by posts for example): it contains itself two fields:
- readingTime: an estimated reading time,
- wordsCount: the number of words in the post content.
The readingTime field offers two formats:
- minutes: the returned number is a rounded estimate of reading time in minutes.
- seconds: the returned number is a rounded estimate of reading time in seconds. It allows you to add some extra logic in frontend to display the reading time (displaying minutes and seconds for example).
Requirements
- WordPress
- WPGraphQL
License
This project is open source and available under the GPL2.0-or-later License.
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.