I Need Suggestion for Listing CPT with Custom Taxonomy
-
I have a Custom Post Type of “projects”, that is categorized by a Custom Taxonomy of “industry”, which is heirarchical. Projects & sub-projects are assigned to the industries. For Example, the “Academic” industry contains, three sub-industries of, University, Community College, & K-12. I need to display the list of projects. I’ve figured out how to list them, but it also lists the sub-projects.
For Example:
Academic -University -Community College -K-12 -- Gordon Elementery -- West Lake High School --- Gymnasium --- Admin Building --- Cafeteria -- Jefferson Elementary
Right now, it lists all projects including the subprojects
In this example, West Lake High School would be the sub-industry under K-12. I want to be able to go to the taxonomy.php page for K-12, and it shows (3) links; Gordon Elementary, West Lake High School, and Jefferson Elementary. Clicking on Gordon & Jefferson should take you to the single.php for those projects, however clicking on West Lake High School should take you to a deeper taxonomy.php that lists the three sub-projects for West Lake High school, which when clicked goes to those single.php pages.
The way that it’s currently set up, If a project has multiple sub-projects, then that parent project is added as a child category (industry). I’ve played around with get_term_children() but just can’t seem to figure out how to work this out. Any suggestions would be greatly appreciated. Thanks
- The topic ‘I Need Suggestion for Listing CPT with Custom Taxonomy’ is closed to new replies.