Skip to content

Instantly share code, notes, and snippets.

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 gianghl1983/3d207ae9d17fd2f96970d4f9b4437210 to your computer and use it in GitHub Desktop.
Save gianghl1983/3d207ae9d17fd2f96970d4f9b4437210 to your computer and use it in GitHub Desktop.
<?php
// Requires Ultimate Member v1.3.68+
// Change Displayname for Business category profiles
add_filter("um_user_display_name_filter","um_custom_businessname", 10, 2);
function um_custom_businessname( $name, $profile_id ){
um_fetch_user( $profile_id );
if( um_user('role') == 'business' ){
$name = um_user("first_name");
}
return $name;
}
?>
@hirenshah
Copy link

Do you know if its possible to add some additional CSS / HTML as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment