You can get wordpress author id by post id like that. Using the get_post_field() function, we can extract the post_author field with the $post_id variable. Other fields we can extract post_content, post_author, post_title, post_name (slug), post_excerptpost_statuscomment_statuspost_parentpost_typecomment_count, post_date, ping_status, post_modified and etc….