Website · articles
The WordPress site announces 46 articles.
A plugin hides 15 from visitors.
Demo WordPress site
The problem
The count does not move.
- The plugin removes articles after the query.
- WordPress still announces 46.
- An import following the pages reads 31 and calls itself complete.
What is not changed
WordPress stays as it is.
- The standard REST API, no extension.
- A subscriber account and its application password.
What had to be written
pagination: { kind: link-header,
total_header: X-WP-Total }WordPress's count is the witness.
One 27-line connector.
Red
46 announced, 31 read: the run fails.
- It gives both numbers.
- No partial list reported complete.
Green
Read as a member: 46 of 46.
- An application password, stored with lm secret.
- The members-only articles are read too.
The limit
The witness is as good as the count.
- If the plugin also fixed the count, nothing would show.
- The hub reads what its account may see.
Try it
The scenario replays locally.
A real WordPress, every step published with its output.