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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -