How do i know if i should use a post object or a relationship?
I have 2 post types, events and speakers.
I have created a schedule field in my events CPT and it is a repeater. One of the lines of the repeater is currently a post object where a user can choose a speaker for that time slot in the schedule. Should the relation type be post object or relationship?
Post object fields and relationship fields are basically the same thing with only a few differences.
– 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
– 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.