First, your taxonomy code has a missing comma before $args
which is causing a fatal error:
register_taxonomy( 'product_category', 'product', $args );
Enable debugging while working on code to see PHP errors, which would reveal the line number and error.
As for your post type, you have a page where you can view all products, which is the post type archive. This argument in your post type registration code enables that:
'has_archive' => true
But since you’ve only set it to true
, it will use the post type name as the archive slug, so your archive is located at:
mysite.com/product/
To change that, simply set it to the slug you want to use:
'has_archive' => 'products'
Then your archive will be located where you want it:
mysite.com/products/
Remember to visit your Settings > Permalinks
page after making changes that effect permalinks, this will flush the rewrite rules.