Skip Navigation

[Resolved] Question bout post-relantioship intermediate

This support ticket is created 5 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.

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)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Shane 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1196841

Tell us what you are trying to do?
Establish Post-Relantionship between 3 CPT.

I have 2 CPT's and i wonder if i really have to create a 3rd CPT.

CPT'S:
Brands <-----many-to-many-----> Product solutions
\ /
Projects (intermediary post)

Brands has 2 custom taxonomies (TYPE and SOLUTIONS)
Product has 0 custom taxonomies

- I Should be able to display a view that shows all brands from a specific custom taxonomy.
- In Product solutions i should be able to display a related products area (product solutions that belong to the same BRAND of the current post and FROM THE SAME CUSTOM TAXONOMY).
- Associate specific product solutions to brands and vice-versa.

This is for the parents, now the intermediary post (Project):

- Be able to filter by projects where Brands (parent) custom taxonomy is TYPE is X and SOLUTION is Y, and by specific PRODUCT Solution used.
- Each project has it own single-page with custom fields for that project (location, finished date, etc).

Hope i made myself clear.

I've read https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/ and as it appears the intermediary post is only to store relantionship fields, so that means that it won't have it's own page, is it correct?

First i thought to create 2 one-to-many relationship like this:

BRAND (grandeparent) -> PRODUCT SOLUTION (parent) -> PROJECT (child)

I just want to know what is the best solution because it will be hard to go back.

Thank you

#1196911

Shane
Supporter

Languages: English (English )

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

Hi Pedro,

Thank you for contacting our support forum.

I'm having difficulties understanding 100% however I will explain what I understand so far.

"- I Should be able to display a view that shows all brands from a specific custom taxonomy."

A. This is possible to do with views and using the view filters.

"- In Product solutions i should be able to display a related products area (product solutions that belong to the same BRAND of the current post and FROM THE SAME CUSTOM TAXONOMY)."

A. I'm assuming here that when you say Product Solutions, you are referring to a custom taxonomy.

"- Associate specific product solutions to brands and vice-versa."

A. Here I'm thing Product solutions is referring to a Product CPT that will be in a Many to Many relationship between Brand and Products. Please let me know if this is correct.

"- Be able to filter by projects where Brands (parent) custom taxonomy is TYPE is X and SOLUTION is Y, and by specific PRODUCT Solution used."

A. I believe I understand what you are saying here. You pretty much want to filter the intermediary CPT called Projects with the Taxonomies from your Brand CPT and also by a related child "Product Solution." For this you are able to Filter it by the Child Post but not the Taxonomy from the Parent post.

To filter any post by taxonomy the taxonomy must be attached to that post itself.

- Each project has it own single-page with custom fields for that project (location, finished date, etc).

A. Yes the projects can have custom fields and they can be added from the relationship screen.

Right now It seems as if you want to use the intermediary CPT as the only thing thats not possible to do is to filter by the Parent Post taxonomies.

Please let me know if this was able to assist you.

Thanks,
Shane

#1197129
Sem Título.png

Hi Shane,

Thank for your time.

I created a diagram, it's easier to explain.

First of all, it's not that i need to use intermediary posts, i just want to find the best way to implement so that after creating the relationships that i don't need to undo all the work.

So what you're saying is that for point 2, it's not possible?

And if i assign the "custom taxonomy 1" to both? The BRANDS CPT and INTERMEDIARY POSTS?

Thanks

#1197314

Shane
Supporter

Languages: English (English )

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

Hi Pedro,

Thank you for the diagram. Its much clearer now.

In your case I would use the Projects intermediary CPT just to be able to see things better.

"So what you're saying is that for point 2, it's not possible?"
Yes it is not possible, because our view filters can only filter for items that are attached directly to the post itself.

"And if i assign the "custom taxonomy 1" to both? The BRANDS CPT and INTERMEDIARY POSTS?"

This would be a good alternative but currently we are not able to apply taxonomies to the intermediary CPT.

If we were to do it without the intermediary CPT this would leave us with

Taxonomy <---->Brand <----> Product

Now we will be able to Filter a Brand by the Taxonomy and By a Product.

Please let me know what you think of this.

Thanks,
Shane

#1197410

Shane,

So what you're saying is that i can create different many-to-many relationships and that will allow me to filter by any of the brothers that are associated among each other?
In your example, I can associate TAXONOMY CPT to BRAND CPT, and PRODUCT CPT to TAXONOMY CPT without passing threw brands.

thanks

#1197512

Shane
Supporter

Languages: English (English )

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

Hi Pedro,

I was only following your example .

However for clarity you connect your Custom Taxonomy to Brand and Brand is Connected to Product.

This would be that if you create a search view for Brand, then you can filter the Brand by the taxonomies that are assigned as well as by Products that are connected to the Brand.

Please let me know if this clarifies it for you or if still not clear.

Thanks,
Shane