I want to get the number of authors. I saw this and moved (all).

I got number 0 or 1 but real is 3.

What should I do?

  • Welcome to WPSE! You need to be more specific. The more detail in your question, the more detailed the answers will be. Editing your question to include the code that you applied would be a good start. – butlerblog Nov 12 '19 at 0:09

This reply was pretty low on the list, on the article you referred to; but it will do the job:

$users_count = count(get_users(array('fields'=>array('ID'),'role'=>'author')));

Originally posted here, buy shanebp

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.