I want to display the user names by the reference of user id.
Is there any function like get_user_displaynme($userid)?
(and one more Is there any shortcode to get group names?)
Thanks in Advance
I want to display the user names by the reference of user id.
Is there any function like get_user_displaynme($userid)?
(and one more Is there any shortcode to get group names?)
Thanks in Advance
You must be logged in to post a comment.
You can use the very same
get_userdata
function of WordPress to code a specific function. Stick this in yourfunctions.php
:So you can do something like:
This may not be an answer to this question, but in the end I reached for this question when I am looking for a way to fetch the display name for the user through the ID
So maybe someone else may benefit from my answer
There is a nice native function called
get_user_by