Answer the question
In order to leave comments, you need to log in
WP User Query - how to get sequence number?
Good afternoon,
I'm using the wp_user_query() class with sorting by numeric meta field to get a list of users in the correct order.
Prompt, how it is possible to receive serial number of the current user avoiding a cycle?
The second day I'm puzzling over this question - in fact, it's not a problem to do this in a cycle
$i++;
if(get_current_user_id() == user->ID) {
echo $i;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question