Skip Navigation

[Resolved] How to set up relationship between post types

This support ticket is created 8 years, 6 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by zoeS 8 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#302320

I have a site with therapies and practitioners. Many therapies have multiple practitioners and many of the practitioners practice multiple therapies. Therapies and practitioners are both post types, and I am also using categories to link the two, since they are not hierarchical (I don't think). There is a category for each therapy and each of these contains the therapy post itself, plus each associated practitioner, so in that way they are linked.

I have quite easily created a list of associated practitioners in a widget on each therapy post, with a view that lists posts of the same category. So now what I'm stuck at: how do I create a view that will list the associated therapies for each practitioner? I guess I need to find out all of the categories in which my practitioner is included, and display posts of the type "therapies" that can be found in the same categories. But how? Thanks!

#302434

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello and thank you for contacting Toolset support.

To create post type relationship you should refer following documentation:
=> https://toolset.com/documentation/user-guides/creating-post-type-relationships/

You will require to setup many to many relationship. To establish that please refer following documentation with example:
=> https://toolset.com/documentation/user-guides/many-to-many-post-relationship/

Using views you can also filter your post by taxonomy:
=> https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/
=> https://toolset.com/documentation/user-guides/passing-arguments-to-views/

I hope this will help you to setup your view. Please do not hesitate to contact us with your queries if any.

#302956

Thanks Minesh, I didn't want to use a many to many relationship as described as it looked like there would be too much admin, but as they can be linked from within the other page types, that might work after all.

#302987

I have set up many to many relationships now between practitioners and therapies, using an intermediary object called "bookings". But now a strange problem has appeared: My list of therapies (hidden link), which is a view displayed in a page, still appears correctly but the links redirect from the individual therapy pages to bookings pages. hidden link for example, now automatically redirects to hidden link. Why would that happen?

#303194

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

*** Please take FULL BACKUP of your database and your website.***

In order to investigate your issue if we require to check things on your install in order to see what could be going wrong there.

If you agree to this please use the form fields I have enabled below this comment box to provide temporary access details (wp-admin and FTP)?

I have set next reply as private.

#303360

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

1)
Unfortunately I do not able to reproduce your issue, when I try to load this URL:
=> hidden link
It redirect me to correct page only.

- To isolate your issue, I would suggest you to check your issue by deactivating all other 3rd party plugins as I can see you are using redirection plugin.

2)
*** Please take full backup of your database and website. ***
You should also try to update your Types plugin to its latest release. The current version is: 1.6.6.4. You can download it from:
=> https://toolset.com/account/downloads/

If your issue still persist, please send me step by step information to reproduce your issue.

#303439

Thank you Minesh, it looks like it's only happening in Firefox for me, so may be some sort of cache issue or something.

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