Hello,
I want to ask you something i have already asked but that is not really clear for me.
My problem is i have two post types (parent, children). And i have to filter on that two post types in the same time.
Toolset said me that i just could filter on one post in the same time, so i have to put in the two post types all fields that need to be filter.
It is what i have done, there : hidden link
With jquery i fill fields with the parent value.
It is ok, it works, but, i don't like that, my client just ask me to add a critery on the search view. So i have to add a new field on child post and fill it with a script. It is so complicated i think.
My question is if i use the relationship field with your new update, if i need to add a new field, is this easy to fill this field on all post types (parent and child) ?
To use the relationship field, i have to use a many to many relationship, and mine is one to many relationship.
What are the consequences if i use M2M between O2M ?
Could i filter on the relationship field ?
My question is if i use the relationship field with your new update, if i need to add a new field, is this easy to fill this field on all post types (parent and child) ?
It sounds like you want to add a new custom field to a relationship, and you would like to know if it's possible to set the value of that field for multiple relationships programmatically. It's no easier to set a custom field for multiple relationships than it is to set a custom field value for multiple posts. Either you set those values manually in wp-admin, or you set them by writing a custom PHP or SQL script.
Could i filter on the relationship field ?
It's not possible to do this from wp-admin right now. This is a feature we plan to include in an upcoming release, but it will not be available right away with Types 3.0. It may be possible with some custom code that uses the Post Relationship API: https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/
Hello thanks for your answer. you din't aswer to my question . :
To use the relationship field, i have to use a many to many relationship, and mine is one to many relationship.
What are the consequences if i use M2M between O2M ?
What are the consequences if i use M2M between O2M ?
Can you be more specific? Are you asking about search query performance, or filtering possibilities, or database size, or something else?