I have two WordPress Websites:
(1) Is a login-only “backend” site where contractors can login an enter data about their company.
(2) Is a front-end site where visitors can fill out a form and receive a proposal from a contractor.
I want to list my contractors from (1) on (2) and show a yelp-like profile.
What is the best way to do this?
My current plan looks like that:
If a contractor gets registered on (1) an action hooks in and creates a “contractor” post on (2). This post holds the user-ID of the contractor in (1).
If visitors on (2) visit that contractor post then the current data gets pulled from (1) via REST-API GET. The user meta-data gets pulled via the user-ID.
Is that a good way to do it?
Would it be better to alternatively POST all profile data from (1) to (2) – not only the user-ID – on each user-data edit? That way (2) would not have to pull data from (1) each time.
Read more here:: REST-API setup for 2 WordPress sites