Convert User ID’s to User Names in a single.php file
$thevoters_ids = get_post_meta( get_the_ID(), “thevoters”, true ); // get a comma separated list of ids $thevoters_ids = explode( ‘,’, $thevoters_ids ); // turn the list into an array foreach ( $thevoters_ids as $thevoter_id ) { // loop through the ids $thevoter = get_user_by( ‘id’, $thevoter_id ); // get the user object by id echo $thevoter->display_name; … Read more