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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.