Skip to content

Instantly share code, notes, and snippets.

@Roy-Oto

Roy-Oto/user.php Secret

Created April 29, 2021 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Roy-Oto/7fcec5334438f9c9f8446d3bcfb6f9be to your computer and use it in GitHub Desktop.
Save Roy-Oto/7fcec5334438f9c9f8446d3bcfb6f9be to your computer and use it in GitHub Desktop.
To display User in Custom Field Suite.
<?php
$values = CFS()->get( 'field_users' );
foreach ( $values as $user_id ) {
$the_user = get_user_by( 'id', $user_id );
echo $the_user->user_login;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment