Skip to main content
added 62 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

thisThe following works foron my install:

$args  = array(
        'orderby'   => 'meta_value',
        'order'     => 'DESC',
        'meta_key'meta_key' ' => 'last_name',
        'role'      => 'subscriber'
    );

soSo did you have to triedtry:

$args  = array(
        'orderby'   => 'meta_value',
        'order'     => 'DESC',
        'meta_key'meta_key' ' => 'last_name',
        'role'      => 'guest-teacher'
    );

and change the order parameter to DESCDESC or ASC ASC to check if it has any effect?

ps: And do you have the lastnamelastname filled out for these users?

this works for my install:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'subscriber'
    );

so you have to tried:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'guest-teacher'
    );

and change the order parameter to DESC or ASC ?

ps: And you have the lastname filled out for these users?

The following works on my install:

$args  = array(
        'orderby'   => 'meta_value',
        'order'     => 'DESC',
        'meta_key'  => 'last_name',
        'role'      => 'subscriber'
    );

So did you try:

$args  = array(
        'orderby'   => 'meta_value',
        'order'     => 'DESC',
        'meta_key'  => 'last_name',
        'role'      => 'guest-teacher'
    );

and change the order parameter to DESC or ASC to check if it has any effect?

ps: And do you have the lastname filled out for these users?

deleted 278 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

this works for my install:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'subscriber'
    );

so you have to tried:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'guest-teacher'
    );

and change the order parameter to DESC or ASC ?

ps: And you have the lastname filled out for these users?

Edit:

(just for reference) the sql query that seems to work is

SELECT wp_users.* 
FROM wp_users 
INNER JOIN wp_usermeta 
ON (wp_users.ID = wp_usermeta.user_id) 
WHERE wp_usermeta.meta_key = 'last_name'  
ORDER BY wp_usermeta.meta_value ASC

this works for my install:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'subscriber'
    );

so you have to tried:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'guest-teacher'
    );

and change the order parameter to DESC or ASC ?

ps: And you have the lastname filled out for these users?

Edit:

(just for reference) the sql query that seems to work is

SELECT wp_users.* 
FROM wp_users 
INNER JOIN wp_usermeta 
ON (wp_users.ID = wp_usermeta.user_id) 
WHERE wp_usermeta.meta_key = 'last_name'  
ORDER BY wp_usermeta.meta_value ASC

this works for my install:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'subscriber'
    );

so you have to tried:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'guest-teacher'
    );

and change the order parameter to DESC or ASC ?

ps: And you have the lastname filled out for these users?

added 278 characters in body
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

this works for my install:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'subscriber'
    );

so you have to tried:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'guest-teacher'
    );

and change the order parameter to DESC or ASC ?

ps: And you have the lastname filled out for these users?

Edit:

(just for reference) the sql query that seems to work is

SELECT wp_users.* 
FROM wp_users 
INNER JOIN wp_usermeta 
ON (wp_users.ID = wp_usermeta.user_id) 
WHERE wp_usermeta.meta_key = 'last_name'  
ORDER BY wp_usermeta.meta_value ASC

this works for my install:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'subscriber'
    );

so you have to tried:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'guest-teacher'
    );

and change the order parameter to DESC or ASC ?

ps: And you have the lastname filled out for these users?

this works for my install:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'subscriber'
    );

so you have to tried:

$args  = array(
        'orderby' => 'meta_value',
        'order' => 'DESC',
        'meta_key ' => 'last_name',
        'role' => 'guest-teacher'
    );

and change the order parameter to DESC or ASC ?

ps: And you have the lastname filled out for these users?

Edit:

(just for reference) the sql query that seems to work is

SELECT wp_users.* 
FROM wp_users 
INNER JOIN wp_usermeta 
ON (wp_users.ID = wp_usermeta.user_id) 
WHERE wp_usermeta.meta_key = 'last_name'  
ORDER BY wp_usermeta.meta_value ASC
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251
Loading