I am trying to display author meta data (username, email) in a custom sidebar widget and I cannot figure it out.
I can display the info on a template page (using php) just fine but that wont work for what I need. I have also figured out how to call the meta data by manually specifying the user id.
I have tried using the same code that works on the template page in my widget code but it wont work (I am not using the WP widget section).
How can I display the meta data (username and email) in the sidebar widget? Is there a way to pull the user id of a post with php? Or is there a better/different way to pull the user meta by php? I am guessing the widget doesn't have access to the same post information that the normal page does?