0

I would like to have the following taxonomy structure:

site.com/courses/course-name/pathway/pathway-name

The domain is such that any particular course can be completed by taking a number of different pathways - different module structures.

The following URLS would work as such:

site.com/courses

shows a list of courses

site.com/courses/course-name

will follow a template e.g. single-course.php, showing title, content and a list of the pathways associated to this course.

site.com/courses/course-name/pathways/

will follow a template e.g. archive-pathway.php, showing course-name and a list of pathways (not be used so much but will still need to work)

site.com/courses/course-name/pathways/pathway-name

will follow a template, e.g. single-pathway.php, showing the course-name title, the pathway-name title and content for this pathway.

The files here may be incorrect whereby I should be using taxonomy-{}.php or otherwise as appropriate, instead of single-{}.php.

My question: is it possible to set up the above hierarchy within WordPress? If so, please provide some code to register_taxonomy or register_post_type as appropriate to help me get started.

I cannot find how to do this elsewhere but am pretty sure this is how courses in the TutsPlus network use WordPress.

3
  • courses is a post type and pathways is a taxonomy?
    – Milo
    Mar 5, 2014 at 18:18
  • Each pathway needs to have its own content, title, custom fields, featured image etc... don't think this can work as a taxonomy but needs to be a CPT in its own right... but somehow almost as a child of a course CPT..
    – Harry
    Mar 5, 2014 at 18:22
  • you mention taxonomy, but don't appear to be using one.
    – Milo
    Mar 5, 2014 at 18:26

2 Answers 2

0

I ended up using Subordinate Post Type Helpers plugin to create relationships between two distinct custom post types: courses and pathways

-1

enter image description hereI'm not entirely sure if this will really help with exactly what you're looking for, but here is the WP template hierarchy. Personally solves a lot of my own questions & is a great reference to look back on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.