0

In my backend, I'm trying to have Insurance setup, where I'd have insurance companies, insurance branches and, of course, contracts that will be tied to users. Now, I have created a custom post type for insurance companies, and custom taxonomy for insurance branches.

This way, I can add insurance branches, like Health Insurance, Life Insurance, etc., create new insurance company(post type insurance company), and set which insurance branches does this new company provide services for(insurance branches).

With all this being said, I'd like to have a custom post type again, for contracts that users have signed with insurance companies, but I need a way to relate one post type with another(insurance contracts->insurance companies). It seems like that's not possible with either WordPress or CPT UI plugin. The only way I figured was to create both taxonomy for insurance companies and post type, and then create a post type for insurance contracts, then use insurance company taxonomy to tie it to said custom post type, insurance contracts.

Is there a better way to achieve this?

  • Is the insurance post type there so that the URLs work? Or do they have content and information on them that wouldn't fit in a single content field? – Tom J Nowell May 10 '18 at 19:54
  • I don't really understand your question. Which post type, insurance company or insurance contract? Insurance contracts will have some custom fields, created with ACF, if that's what your're asking. – Milos May 10 '18 at 19:58
  • in ACF, you can create a field with type "relation" that you can link to another post type. – mmm May 10 '18 at 21:04
  • @Milos insurance company – Tom J Nowell May 10 '18 at 22:40
0

As per dialogue in comments, and @mmm response, ACF(Advanced Custom Fields) plugin can create relations between custom post types.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.