• what is about:
    Let’s say you created custom post type under slug “movies”.
    Now you have created taxonomy “Genre” with the same slug “movies”.

    The idea is for the obvioius logic. Taxonomy is for filtering. It’s more naturl to filter movies by /movies/horror/ then /movies/genre/horror or /genre/horror.

    I use plugin “Simple Custom Post Type Archives” to make working /movies/ url that lists the posts. But cannot make WP to catch correctly taxonomy term link (/movies/horor).

    I tried to solve it by hooking into “template_redirect”. But the problem is here already comes 404 status header… So seams the only way is deal with redirects or maybe there is other options I don’t know.

    Anyway… I need help. Who has idea how to overcome it? I’m sure I’m not the only that would like to make it.

Viewing 1 replies (of 1 total)
  • jtost

    (@jtost)

    Hi ejikas!

    I have the same problem. I need to use the same custom taxonomy slug than my custom post type slug.

    I have a custom post type with slug “press”, and the post permalinks have this structure:

    mysite.com/press/postname

    In other hand I have a custom taxonomy with id “presscat”, and I need it to have the same slug “press”. This taxonomy has terms like “news”, “case studies” and “factsheet”, and I need a permalink structure like:

    mysite.com/press/news
    mysite.com/press/case-studies
    mysite.com/press/factsheet

    The problem is that if use the same slug for both cases, I get my custom posts (with url “mysite.com/press/postname”) as if they were terms of the “press” taxonomy (“postname” as term). I tried to fix it with the “template_redirect” hack, but like ejikas, I get the same 404 error.

    Anyone has fixed this issue?

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘custom post type and taxonomy share one slug’ is closed to new replies.