Skip Navigation

[Resolved] Relation depending on a taxonomy.

This support ticket is created 3 years, 10 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.

Our next available supporter will start replying to tickets in about 6.99 hours from now. Thank you for your understanding.

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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 3 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1901809

Hi support.

Is it possible to create a relation between post and a custom post type, but only if the post is in a specific taxonomy?

Like if you have a post in a category named book review, then you are able to relate that post to writer, but if the post is in a category Colors, then you can relate the post to a post type named paintings.?

The reason I ask is because otherwise the only alternative is to create custom post types for each relationships. And then you can't use the "default" post query for the blog roll, but have to build specialized queries.

I don't think it is possible, because the relationship wizard does not make it possible, but before I start that work of building lots of custom post types, I thought I would ask.

#1901989

Hello,

It is possible, for example, you can try these:
1) Create custom field group, in section "Appears on", click button "Edit", specific post type and taxonomy terms.
2) Then add a Post Reference Field in above group:
https://toolset.com/course-lesson/using-post-reference-field-to-set-up-one-to-many-relationships/

#1903243

Hello Luo

I am sorry but it is not possible to select a Postreference field type, when I create the new field.

Please see this video : hidden link

Cheers

#1903345

As I mentioned above, you need to specify the post type and taxonomy terms in section "Appears on".

And I have tried it in my localhost, it works fine, if you need more assistance for it, please provide a test site with the same problem, I can setup a demo for you