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 );
4 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).
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.