As the title says, I want to remove the taxonomy slug from URL. Instead, I want to keep the post type slug. For example: I have a post type called "Books" (rewrite_slug = books
) and a taxonomy called "Genre" (rewrite_slug = genre
) which includes "Science fiction", "Drama", "Comedy" etc.
Right now I have two options which work:
site.com/books/genre/comedy/
and
site.com/genre/comedy/
I want the url to look like:
site.com/books/comedy/
Is there a simple rewriting rule for this?
comedy
a book or a genre? How will WordPress distinguish between the two?comedy
is a term which belongs to the taxonomygenre
. If I want to access a specific book I'd want this url:site.com/books/comedy/some-comedy-book-name
.SITENAME | Genre Comedy
to haveSITENAME | Comedy
orSITENAME | Comedy Books
. Thank you.wp_title
to set it to whatever you want.