Get the WordPress User ID by Vendor/Host ID

How can I get the WordPress User ID by Vendor/Host ID? Thank you.

1 Like

Following, need the same.

$author_id = get_post_field( ‘post_author’, $vendor_id );

3 Likes

Sorry for the delay. The suggested code snippet seems to be ok, the user ID is stored in the “post_author” field of the vendor post (vendor is a custom “hp_vendor” post type).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.