« first day (2 days earlier)      last day (29 days later) » 

06:39
@JonSnow Not sure indeed: it could be a caching issue, a plugin or theme conflict, or an unexpected behavior within WordPress's query optimization mechanisms.

- caching: If category names are part of cache keys or influence cache retrieval in any way, renaming categories might invalidate related cache entries, leading to fresh database queries and correct counts being fetched.
Clear all caches, including any caching plugins, your browser cache, and server-side caches (like Redis or Memcached, if applicable). Also, if you are using a hosting service with built-in caching, check their contro
 
1 hour later…
07:57
Hi @VonC, thank you for all of the ideas above. Yes, there was a non-unique slug before, due to the migration of content from different sites. I have changed it later, but maybe this is still an issue. Renaming categories and slugs does not help at the moment (as the category cannot remain as "TestA", but must be "A").
From you experience: do you know a plugin that could help clearing the (server-side) cache?
 
5 hours later…
13:29
All caches cleared, no changes ... It's enough to make you tear your hair out
 
7 hours later…
20:56
@JonSnow OK. A few suggestions:

- Check for Orphaned Terms: Sometimes, terms (categories, in your case) may not be correctly associated with their taxonomy in the database due to previous migrations or deletions. Inspecting the `wp_terms`, `wp_term_taxonomy`, and `wp_term_relationships` tables in your WordPress database can help make sure there are no discrepancies.
- Directly inspect the `slug` field in the `wp_terms` table for the categories in question to make sure they are indeed unique and there are no hidden characters that might cause issues.

« first day (2 days earlier)      last day (29 days later) »