Tell us what you are trying to do?
I have three content types in a M2M relationship. Staff Members, where the profile information is stored, Departments (where the name of their sub-department is stored), and Parent Department (where the name of the parent department is stored.)
The relationship is displayed correctly on the backend with the sub-department relationship automatically connected to the parent department. But I can't figure out how to get the parent department to register in my "Parent Department Card View" of staff members in a specific parent department.
I have tried a wpvrelatedto view (which didn't immediately seem to show people without a manual connection being added for parent department, same as a normal relationship filter), and I have tried using a Post Reference field for both departments, and parent departments. (In which case, the post reference for parent departments works, but the one for departments doesn't work inside of CRED.
Is there any documentation that you are following?
the closest documentation does not exactly directly apply, as it has to do with child posts and this is one step removed.
Is there a similar example that we can see?
What is the link to your site?
hidden link
I'd be happy to give you a login, just ask.
Hello,
Please provide your website credentials in below private message box, and describe detail steps for question:
I can't figure out how to get the parent department to register in my "Parent Department Card View" of staff members in a specific parent department.
How and where can I see above problem?
how do you want the parent parent department to be registered as a a specific parent department?
Thanks
Thanks for the details, I can login into your website, will update here if there is anything found
Here are what I found:
1) I assume we are talking about this case:
Three post types:
- Staff members
- Departments
- Parent Departments
Two post type relationships:
- Many-to-many relationship between post types "Staff members" and "Departments": "Staff members Departments"
- One-to-many relationship between post type "Parent Departments" and "Departments": "Parent Departments (CPT) Departments"
And you are going to do this:
In a single "Parent Department" post, display all related "Staff members" posts.
If it is, this is possible within a nested view, for example, you can try these:
1) Parent post view:
- query "Departments" posts,
- filter by post type relationship between "Parent Departments" and "Departments":
Select posts in "Parent Departments (CPT) Departments" relationship that are a related to the Post where this View is shown.
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
- in section "Loop Editor", display below child post view.
2) Child post view,
- query "Staff members" posts
- filter by post type relationship between "Staff members" and "Departments":
Select posts in "Staff members Departments" relationship that are a related to the current post in the loop
- in section "Loop Editor", display the "Staff members" post information
So in this case, you don't need to setup post type relationship between post types "Parent Departments" and "Staff members".