I am trying to create a specific url structure for my custom post type called “products”:
- the leading “products” is just an added string
- category-name is the category of a product post
- product-name is the title of the product post
So: for a product “Nuts & Coffee” with a category of smoothie – the url would be root/smoothie/nuts-and-coffee.
I thought that it would be as simple as adding this code in the products custom post type:
slug => "products/%category%/"
but when I do that, the category doesn’t show up. Am I implementing the slug wrong or am I going about this wrong?
Any help appreciated!