Skip Navigation

[Resuelto] Advice on setting up Post Relationships

This support ticket is created hace 7 años, 9 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 respuestas, has 2 mensajes.

Last updated by Craig hace 7 años, 9 meses.

Assisted by: Shane.

Autor
Mensajes
#418349

I am just about to try and set up some Custom Post Types for an upcoming project and was looking for some advice on how best to set up the relationships…

There will be the following CPTs (required fields in parentheses):

Housing Personnel (Name, Email Address, Telephone, Locations)
Maintenance Personnel (Name, Email Address, Telephone, Locations)
Support Personnel (Name, Email Address, Telephone, Locations)

Each of the above CPTs should be able to be assigned multiple locations.

The following will also be required for displaying on a Google Map with Clustering

Housing Locations (Name, Address, Weblink)

Any thoughts on the best way to set this up?

#418470

Shane
Supporter

Languages: Inglés (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Craig,

Thank you for contacting our support forum.

So i understand what you are trying to do but not sure how these posts are actually related to each other.

Could you explain a bit further on the relationship between them?

Thanks,
Shane

#418484

Hi Shane,

Thanks for replying. OK, let me try to explain in more detail…

Housing Personnel, Maintenance Personnel and Support Personnel will all have at least one 'Housing location' assigned to them, but sometimes more than one.

Each 'Housing Location' will be a town name which will be displayed on a separate Google map and will also be selectable via dropdown menu. There may also be multiple 'Housing Location's per town.

e.g.
Joe Bloggs, Housing Officer covers Town A, Town B and Town C.
John Doe, Maintenance Officer covers Town A.
Mary Smith, Support Officer covers Town C.
Jane Doe, Support Officer covers Town A and Town B.

If someone searched for Town A, the result would list Joe Bloggs, John Doe & Jane Doe (with their contact details).
If someone searched for Town C, the result would list Joe Bloggs & Mary Smith (with their contact details).

The Map would be used show the locations of all the available Housing (clustered where there are many locations in close vicinity).

I hope that explains things a bit better. If not, let me know and I'll try an visualise it.

Kind regards,
Craig

#418534

Shane
Supporter

Languages: Inglés (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Craig,

Thank you for clearing this up for me.

So what I suggest is that you have a single post called Towns, then for towns you will have
Housing Personnel
Maintenance Personnel
Support Personnel

Being parents of that towns custom post type. Then you can add the map field to towns.

Please let me know if this helps.
Thanks,
Shane

#418690

Hi Shane,

Thank you for your input, I shall give this a try and follow-up if I need any further help.

Kind regards,
Craig

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.