Skip to main content
added 103 characters in body; edited title
Source Link
Michael Ecklund
  • 6.8k
  • 13
  • 68
  • 110

Permalink structureStructure CPT with custom taxonomy failsWith Custom Taxonomy Fails

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/

  1. The URL structure should be: site.com/courses/course-type/course-single-post/.
  2. 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 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 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:

Permalink structure CPT with custom taxonomy fails

I'm getting quite frustrated setting up the correct URL structure for a CPT with a custom taxonomy.

I have a CPT called 'courses' with a custom taxonomy called 'course type'. 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

Thing is , I don't know why the site.com/courses returns a 404 instead of showing an archive page listing all CPT's...?

This is the code that I've used:

Permalink Structure CPT With Custom Taxonomy Fails

I'm getting quite frustrated setting up the correct URL structure for a Cutom Post Type with a Custom taxonomy.

I have a Custom Post Type called courses with a Custom Taxonomy called course-type.

  1. The URL structure should be: site.com/courses/course-type/course-single-post/.
  2. 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 Custom Post Type which is correct too

I don't know why the site.com/courses/ returns a 404 instead of showing an archive page listing all Custom Post Type's...?

This is the code that I've used:

edited tags
Link
fuxia
  • 107.1k
  • 38
  • 255
  • 459
edited tags
Link
Michael Ecklund
  • 6.8k
  • 13
  • 68
  • 110
added 1 character in body
Source Link
NielsPilon
  • 316
  • 4
  • 17
Loading
Source Link
NielsPilon
  • 316
  • 4
  • 17
Loading