I have 3 custom post types:
Students
Training Courses
Companies
I have 2 relationships set up:
Students <<Attendances>> Training Courses - this is to track which courses students have completed.
Companies <<Company Employees>> Students - this is to record which students belong to which company
I am trying to:
Display a list of courses that an individual student has completed on a Companies (single) content template.
Example: hidden link
To insert the list I have created a view called 'list-of-students-completed-training-courses' but the result is No items found.
Is it possible to display the course information given that the Attendances intermediary post type is not related to the Companies post type?
You are starting at companies and want to display courses.
companies students courses
\ / \ /
You can't leapfrog all the way in one go, you need nested Views.
Starting from your template for companies, your first View queries students (with a post relationship query filter to connect it to the company where this View is shown), and in the output section of this first View—which is returning student posts—you insert a second View, this time querying courses, with a post relationship filter to connect it to the current post in the outer loop.
If you've been trying out the new blocks editor for Views you should be aware that support for nested Views isn't included yet, you'll need to persist with the classic Views editor.