• Suppose I have a custom post type Functions with 2 advanced custom fields: function name and function info.

    I would like to make a dropdown of all my personally made functions and have it appear as a custom field of another custom post type Persons.

    Evidently one field is enough to appear in the dropdown: function name.

    How to do this?

Viewing 1 replies (of 1 total)
  • Have you tried the relationships field? Create a relationship field for Function posts, and match it the Persons CPT. That will give you a dropdown list of all Persons posts to pick from on the Functions post, and then you can do an ACF relationship query (basically a nested post query) to display and work with it dynamically.

    If that doesn’t work you might consider looking at the Post2Posts plugin as it creates relationships between content types in a slightly different way that may work better for you.

    Out of curiosity, is there a functional reason you’re using ACF fields for the title and body of the Functions cpt, instead of post_title and the_content?

    • This reply was modified 5 years, 10 months ago by jamieschmid.
Viewing 1 replies (of 1 total)
  • The topic ‘Custom post type as custom field of another custom post type’ is closed to new replies.