Pergunta

I'm trying to order the member list by display_name or first name ASC. http://sim.is/sim/felagatal-sim/

This doesn't seem to work. Any pointers out there? :/

$users = get_users(array(
    'role' => 'sm_flagar',
    'orderby' => 'display_name',
    'order' => 'ASC',
));

    foreach ($users as $user) {
        $firstName = get_user_meta($user->ID, 'first_name', true);
        $lastName = get_user_meta($user->ID, 'last_name', true);
            echo '<li><a href="' . $user->user_url . '">' . $firstName . ' ' . $lastName . '</a></li>' . PHP_EOL;
    }

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a wordpress.stackexchange
scroll top