I am trying to display all users that have a meta d开发者_开发知识库ata of with a specific value.
So in my case, I have a custom user meta data field called isblogger, with the options yes or no. So I would like to list users that have the isblogger value as yes.
Currently here is the code I have that is dispaying all users
global $wpdb;
$authors = $wpdb->get_results("SELECT ID, user_nicename FROM $wpdb->users"); foreach($authors as $author) { ?>
list name etc...
Any help on this would be fantastic and much appreciated.
You have to add Where condition isblogger='yes'
精彩评论