1

Just curious if can I autopopulate custom post fields (like checkboxes or select items) based on another custom posts setup?

My goal is to create a custom post types "employees" which can have assigned multiple service areas (stored as another custom post types), as group of checkboxes or drop downs fileds, as well will be able to assigned multiple office locations (stored as another custom post types) as well as group of checkboxes or drop downs fields to each employee. Main goal is to avoid redundancy and pull office locations and services from one centralized location as options fields for employees custom post type.

Or maybe there is a better solution to tackle that problem like using categories of employees custom posts for service areas and tags (for custom post types) as office locations?

Thanks

  • Yes, you could store the IDs from one post type in post meta of another post type. There are a few plugins that enable this pretty easily, like Posts 2 Posts. – Milo Nov 25 '15 at 16:52
  • I'm not sure I understood your examples particularly well, can you provide another that's simpler? – Tom J Nowell Nov 25 '15 at 17:20
  • @TomJNowell Example is simple enough. I have rephrased it for better relationship visualization. – JackTheKnife Nov 25 '15 at 17:25
  • I'm still a little perplexed as to how the middle paragraph fits in to the question, do you mean "I have employees, and I need to assign them service areas and office locations, how do I do this?", or you've done that and now you need to specify the defaults? "Cross references custom post types" as a phrase doesn't hold any meaning, neither does a "custom posts setup". Try and describe what you're trying to do from a purely UI point of view using simple end user language, then describe the current data structure you have – Tom J Nowell Nov 25 '15 at 18:13
  • 1
    @TomJNowell updated with better wording for an example above – JackTheKnife Nov 25 '15 at 18:32
0

I have fund that Types plugins can handle that kind of functionality out of the box. More here

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.