Displaying posts of checked taxonomy terms in list?
-
Hi all,
I am currently trying to create a function where a user can tick a checkbox in a meta box in a custom post type page that will then list all the posts of another custom post type taxonomy term.
To simply here is what I have done:
1) I have created 2 CPTs, 1 is for ‘Staff’ the other is for ‘Services’.
2) For the ‘Staff’ CPT I have set up a taxonomy named ‘departments’ which has terms such as ‘childcare’, ‘crime’ etc.
3) Each ‘Staff’ post has been assigned to whatever ‘departments’ are relative.
4) I have created a checkbox in a custom meta box for the ‘Services’ CPTs, which lists all the ‘Departments’ taxonomy terms.
What I need to do now id figure out how I can use the data from the ‘Services’ checkbox to polulate a list of Staff Members on the Service page. For example, say I add a service page called Medical and check the ‘childcare’ and ‘crime’ boxes, I want the Medical service page to display in separate lists the titles (with links) to any Staff CPTs that have been assigned to those terms.
Is this possible? If so, can anyone point me in the right direction as to how I would do this please?
Many thanks,
Adam
- The topic ‘Displaying posts of checked taxonomy terms in list?’ is closed to new replies.