I'm trying to only show authors in my user's page. I was hoping that user role editor could do the trick but apparently not. Is there a way to do it? Thanks


you could use wp_list_authors for list your authors in your user page. Put a look here: https://codex.wordpress.org/Function_Reference/wp_list_authors Does it help you?

EDIT: According to our communications:

$users_array = array();
$users = get_users('role=author');
if(count($users) > 0){
    foreach($users as $user){
        $users_array[] = $user->ID;

add $users_array instead of array(1, 3, 5) ...

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.