Viewing 1 reply thread
  • Author
    Posts
    • #3667
      wpforchurch
      Member

      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?

    • #3668
      Steve
      Keymaster

      @church– Piklist creates a custom table for this: wp_piklist_cpt_relate. I suggest basing your code off our standard relate field.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.