I’m trying to relate posts in my own function, but can’t figure out how to do it.
Here’s the scenario. I’m building a simple system to manage church families. I have two CPT: contacts and households.
I’m using a check box on the contact CPT to indicate whether a new household CPT should be created for the contact. This is used if the household isn’t already in existence. I’ve hooked into piklist_save_field to look for the checkbox and create the household.
However, I’m not sure how to relate the contact to the newly created household. Can you point me in the right direction?