I registered a post type of 'product', and also registered a taxonomy 'poruct-cats' for this post type.

When I want to access to product-cats it seems like below:


The above url is not seo friendly.

I Like the url be like below:


I spent lots of time for reading about WordPress rewrite in codex but I finally could not do that.

Any suggestions is appreciated.


1 Answer 1


Just use the following rewrite argument in your register_taxonomy() call:

register_taxonomy( 'product_cat', 'product', array(
    'rewrite' => array(
        'with_front' => false,
        'slug' => 'product/poruct-cats',

    // Other arguments

Not the answer you're looking for? Browse other questions tagged or ask your own question.