Skip to content

Instantly share code, notes, and snippets.

@kimisgold
Created April 26, 2012 22:14
Show Gist options
  • Save kimisgold/2503606 to your computer and use it in GitHub Desktop.
Save kimisgold/2503606 to your computer and use it in GitHub Desktop.
tagged_users in wordpress
<?php
$tagged_once = get_users('meta_value=ngh-blog');
$tagged_both = get_users('meta_value=ngh-ndh');
$tagged_users = array_merge($tagged_once, $tagged_both);
foreach ($tagged_users as $user) {
$current_user = $user->ID;
if(get_user_meta($current_user,'first_name', true)) {
echo '<p>';
echo '<span class="member-name">' . get_user_meta($current_user,'first_name', true) . ' ' . get_user_meta($current_user,'last_name', true) . '</span>' ;
echo '<br><span class="member-description">' . get_user_meta($current_user,'description', true) . '</span>';
echo '</p>';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment