Skip Navigation

[Resolved] Creating link to the office page of an employee

This support ticket is created 5 years, 8 months ago. 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.

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

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by JamesK4399 5 years, 8 months ago.

Assisted by: Waqar.

Author
Posts
#1243323
employee-city.PNG

Hello, again.

I have a table of employees and a table of offices.

On the employee page I want a link to the office where that employee works. The key would be the city. I created a many-to-many relationship but it doesn't ask what the key to that relationship would be.

I could do this with SQL but don't know to make that link with toolset.

Thanks again for your help. You guys have been great!

Jim

#1243404

Hi Jim,

Thank you for your kind words and I'll be happy to assist.

The way post relationships work in Toolset, you don't have to specify a "key" to connect two posts.
( ref: https://toolset.com/documentation/post-relationships/ )

Based on what you've shared, I'll recommend the following steps:

1. You can create a "one-to-many" post-relationship between the "Offices" post type and the "Employees" post type.
( which means that each office location can have multiple employees )

2. After that, you'll be able to connect the individual office to an individual employee, from the edit screen of both these post types.
( ref: https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/ )

3. Once these connections have been set up, you'll be able to show any information from the related posts (including the post title with the link), on each other's pages.
( ref: https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/ )

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1243744

My issue is resolved now. Thank you!