0

I've got a real estate website.

How can I make a connection with property and a client which is an owner of the property? There will be a lot of properties, and sometimes 1 owner will have 2 or more properties.

I made 2 kinds of post_types - properties and owners.

Do you have any ideas? Please help

Edit:

My adding new property is on a Frontend-page, so I have to make input with adding new taxonomie (Owner) for real estate agent. How can i do that?

  • 3
    Use post meta fields, save the owner's ID in a meta field for the properties. – janh Dec 13 '17 at 9:46
  • @janh Exactly what i would do. In the Advanced Custom Fields plugin there is a relation field or something like that. Thats perfect for adding a nice UI so you dont have to search that id every time – GDY Dec 13 '17 at 9:58
0

You can create a custom post type named "Property" and add a custom taxonomy named "Owner" to it.

This will help you assign properties to their respective owners even if 1 owner has multiple properties (or vice versa).

  • Thanks a lot for your help. I've done as you said. Now I have another problem - My adding new property is on a Frontend-page, so I have to make input with adding new taxonomie (Owner) for real estate agent. How can i do that? – Michał Misiek Dec 13 '17 at 14:55
  • use this wp_insert_term() - codex.wordpress.org/Function_Reference/wp_insert_term – Sid Dec 14 '17 at 5:23

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.