Wordpress user search query order by most recent login -


i'm creating custom user search results page , order results a) post_count (easily done) b) when user last logged in - i.e. active users.

is possible? there user meta field in db login date?

this have far:

$args = array(                 'number' => $users_per_page,                 'paged' => $current_page                 ); 

thanks.

figured out answer this. found meta key last_activity.

$args = array(             'order'          => 'desc',             'orderby'        => 'last_activity',             'number' => $users_per_page,             'paged' => $current_page             ); 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -