[ Close ] Introducing Carbon Fields Version 3 - now with Gutenberg Blocks Support


Documentation > Fields > Relationship


This field allows to select and reorder posts of any post type. Useful for creating links between any of the post type entries.

Setup methods


It allows you to specify the post type types you want to have available in this relationship field. Defaults to post.


Allows you to limit the maximum number of selected items in a relationship field. By default, there is no limit.

Field::make('relationship', 'crb_relationship')


If enabled will allow the same item to be selected more than once. By default, duplicates are not allowed.

Field::make('relationship', 'crb_relationship')


The example below registers a relationship field with all posts from the post post type:

Field::make('relationship', 'crb_relationship')

Excited about Carbon Fields? Spread the word!