Created
April 29, 2022 18:45
-
-
Save someguy9/681cf9c747dfed83c48928f58f5c4239 to your computer and use it in GitHub Desktop.
Get a user's details by their username in WordPress
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 | |
$user_data = get_user_by('login', 'someguy'); | |
echo 'The user ID is '.$user_data->ID; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment