Skip to content

Instantly share code, notes, and snippets.

@imran-khan1
Last active September 6, 2019 06:37
Show Gist options
  • Save imran-khan1/b4d997b0b74b1d01b02724b34847fdde to your computer and use it in GitHub Desktop.
Save imran-khan1/b4d997b0b74b1d01b02724b34847fdde to your computer and use it in GitHub Desktop.
<?php
//flatsome theme display role after account user
function display_role_after_account_user() {
$user_id = get_current_user_id();
$user_meta=get_userdata($user_id);
$user_roles=$user_meta->roles[0];
echo '<p style="color:red;"><b>Role:</b> '.$user_roles.'</p>';
}
add_action('flatsome_after_account_user', 'display_role_after_account_user');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment