Home › Forums › General Issues › Post Object vs Relationship. Which should I use? › Reply To: Post Object vs Relationship. Which should I use?
Post object fields and relationship fields are basically the same thing with only a few differences.
Post Object
– Select a related post (or posts)
– Default is only one post can be selected
– when allowing multiple, the max allowed cannot be limited
– returns a single post when not allowing multiple selections
– returns an array of posts when allowing multiple selections
Relationship field
– Select a related posts (or posts)
– Default is to allow multiple selections
– Can be limited to a specific number, including 1
– Always returns an array of posts, even if there is only one
Other than the settings I listed above, the UI for the field is vastly different.
As far as choosing a field by looking at what they do, for me it really depends on if you want to limit selections to something other than 1. If selections will be unlimited then there is no difference except for the UI that is used and I would choose the UI that will make the most sense to the person that will be doing the content management.
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.