array(
array(
‘key’ => ‘display_author’, //My custom meta key to only display specific, handpicked authors
‘value’ => ‘1’,
),
),
);
$site_url = get_site_url(); //get the site url for later use
$authors = get_users($args); // Get users satisfying our parameters
function cmp($a, $b){ //The function to order our authors
if ($a->order == $b->order) { //This is where the name of our custom meta key is entered, I named mine “order”
return 0;
}
return ($b->order > $a->order ) ? -1 : 1; //The actual sorting is done here. Change “>” to “<" to reverse order
}
usort($authors, 'cmp'); //usort sorts our $users array with our function cmp()
// Check for results
if (!empty($authors)) //Only do this if there ARE any authors to list
{
foreach ($authors as $author) // loop trough each author
{
echo '