I'm getting quite frustrated setting up the correct URL structure for a CPTCutom Post Type with a customCustom taxonomy.
I have a CPTCustom Post Type called 'courses'courses
with a custom taxonomyCustom Taxonomy called 'course type'. The url structure should be: site.com/courses/course-type/course-single-post. For example: sitecourse-type
.com/courses/science/rocket-to-the-moon/
- The URL structure should be:
site.com/courses/course-type/course-single-post/
. - For example:
site.com/courses/science/rocket-to-the-moon/
site.com/courses/ returns a 404
site/com/courses/science/ shows an archive page with all posts in side that custom taxonomy which is correct
site.com/courses/science/rocket-to-the-moon/ shows the single CPT which is correct too
site.com/courses/
- returns a 404site.com/courses/science/
- Shows an archive page with all posts in side that custom taxonomy which is correctsite.com/courses/science/rocket-to-the-moon/
- Shows the single Custom Post Type which is correct too
Thing is , I don't know why the site.com/coursessite.com/courses/
returns a 404 instead of showing an archive page listing all CPT'sCustom Post Type's...?
This is the code that I've used:This is the code that I've used: