I’m not sure if you have tried searching for it:
https://wordpress.org/search/display+user+role
A quick glance over some of the results, you can do it within the loop of your theme. I will say, try to avoid editing parent theme files unless you don’t intend to update the theme, otherwise use a child theme to make those needed changes.
If you are not familiar with making child themes take a look at:
https://make.wordpress.org/training/handbook/theme-school/child-themes/
It is a great write for any skill level
Thread Starter
RLsARc
(@rlsarc)
as i’ve read the link above, it’s edited in pluggable.php file but where exactly to insert the code…
$user_roles = $current_user->roles;
$user_role = array_shift($user_roles);
echo '<strong>Current User Role</strong>: ' . $user_role;
which line?
btw thanks for the reply. hope you’ll get me through this.
Thread Starter
RLsARc
(@rlsarc)
I’ve try the code above but my site won’t load so I reverted the changes. please help, newbie here Y_Y