Hi,
I have created two CPT (carnet de voyage and createur).
After that I created a view who listed the carnet de voyage on the page of a createur.
On carnet de voyage I have a dropdown to select the relative createur
The view work well but I didn't know how to filter the view to display on the page of the createur the carnet for this specific createur
thanks for your help
Hello,
I assume we are talking about this case:
1) Two post types:
- createur
- carnet de voyage
2) One "createur" post can connect to multiple "carnet de voyage" posts.
One "carnet de voyage" post can connect to only one "createur" post.
If it is, you can setup one-to-many relationship between post type "createur" and "carnet de voyage", see our document:
https://toolset.com/documentation/post-relationships/
In a single "createur" post, create a post query:
- query "carnet de voyage" posts
- filter by the post type relationship
- display "carnet de voyage" post information
See our document:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/#3-creating-a-view-that-lists-the-children-of-the-parent-post
Hi,
thanks for your reply not sure to understand how to do that.
I have this error " This will filter out posts of the following types, because they are not related to any other post type: Carnets de voyage"
thanks
As I mentioned above, you can setup one-to-many relationship between post type "createur" and "carnet de voyage", you can setup the post type relationship here:
Dashboard-> Toolset-> Relationships
see our document:
https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/
Hi,
thanks it's ok for the relationship but I have no result in the view (no item found child)
Regards
This is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again
3) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
Thanks for the details, I am downloading the files, will update here if there is anything found
Here are what I found, in the problem post "Laure Aouabed", there isn't any child "Créateurs Carnets de voyage" posts:
hidden link
To test the view's results, you can add some posts in section "Créateurs Carnets de voyage", see screenshot: add-child-posts.JPG
See the result here:
hidden link
section "MON CARNET DE VOYAGE"
Hi,
thanks I didn't see this new feature.
But this relation must be chosen in the carnet de voyage "test 1".
There is a dropdown where we can choose Laure Aouabed.
Because it's more simple to associate immediately the carnet de voyage to a person rather than search after thousand of carnet de voyage.
Thanks for your help
You can connect those posts with each other in both end, for example, you can edit the single "Carnet de voyage" post: test 1
hidden link
in section "Créateur Carnet de voyage", click link "Se déconnecter" to remove the connection, then connect it to other parent "Créateurs" post.
Since it is one-to-many relationship, so:
- each "Carnet de voyage" post can connect with only one "Créateurs" post,
- each "Créateurs" post can connect with multiple "Carnet de voyage" posts,
See our document:
https://toolset.com/documentation/post-relationships/