Tell us what you are trying to do?
Hi, I want to display a post count on this page (under each user). And now it counts all posts (post types "post", "definition (lexique)", "tools") for both languages. hidden link
Is there a way to count posts only for current language ?
I have already did this steps, but that didn't help.
- Clear the Cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Fix WPML table collation
- Set language information
- Fix Terms count
You will need to select a language, loop over the posts, and store the result.
Then change the language, and do the same and count.
Do it for all the posts.
Switch back the language to the language that you had originally.
The code given in the response is as it and if you need additional help you will need to contact a qualified developer: