Support

Account

Home Forums Feedback Building relations with ID Reply To: Building relations with ID

  • How do you know what user (supplier) is adding a post? Do they select this or is it dynamically generated?

    If you user is logged in, couldn’t you use the user_id? If a supplier has multiple users, are do you associate a logged in user with a supplier?

    Do you set up the supplier post? You could have a “user” type field where you select the users that are associated with the supplier. Then you can query the supplier posts based on the user that is currently logged in it get the supplier ID (which will have a unique Post ID). Then you can add the supplier POST ID to rooms and facilities posts when they are created. This could be a field in ACF, or it could be a custom field that is not part of ACF because it’s only used to tie things together.

    ACF field groups are have unique ID values. What doe not have unique ID’s are the custom fields themselves. But there are plenty of unique ID’s floating around in WP.