Last active
September 6, 2019 06:37
-
-
Save imran-khan1/b4d997b0b74b1d01b02724b34847fdde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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