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:




I want the url to look like:


Is there a simple rewriting rule for this?

  • Is comedy a book or a genre? How will WordPress distinguish between the two?
    – Milo
    Sep 15, 2015 at 17:02
  • @Milo - comedy is a term which belongs to the taxonomy genre. If I want to access a specific book I'd want this url: site.com/books/comedy/some-comedy-book-name.
    – user80414
    Sep 15, 2015 at 17:06
  • @Milo - is it possible to remove the taxonomy slug from the title of the page? That is, instead of SITENAME | Genre Comedy to have SITENAME | Comedy or SITENAME | Comedy Books. Thank you.
    – user80414
    Sep 17, 2015 at 17:57
  • Depending on how your theme handles those titles, you can add a filter to wp_title to set it to whatever you want.
    – Milo
    Sep 17, 2015 at 17:59