How we can get the author ID by its Name
get_user_by will get you the user data by ‘id’, ‘slug’, ’email’, or ‘login’. ‘slug’ is the user_nicename. $user = get_user_by(‘slug’,’nicename’); However, I am not sure what you mean by ‘name’. There are other plausible ‘name’ fields, not all of them required. There is the display_name for example. To search fields like user_nicename you will need … Read more