I have created a post category called Products for a client where they can list products with a
link to their off-site shopping cart to purchase them.
Right now, the URL reads like this:
http://www.domain.com/category/products/
How can I change it to something like:
http://www.domain.com/store/products/
I plan on adding 2 additional categories that would need /store instead of /category as well. I
know the logic off what I want to do, just not the syntax.
IF category = a, b, or c THEN /store ELSE /category
So my first question is a) is this possible and b) what is the correct way to implement it?
Many thanks,
Cynthia
Category permalink structures are set globally. You can change how category permalinks are set by navigating to Settings->Permalinks and setting the Category Base to: /store/%category%
Bear in mind my original point: Since category permalinks are set globally, this will affect ALL categories, not just certain ones. So use the above only if you’re using Post Categories to organize your store, and not for anything else.
Otherwise, I would recommend using a Plugin to register Custom Post Types and Custom Taxonomies (Types is a good one) and organize your store that way.
Or if you prefer to do what you want with code, you can Register a Custom Post Type, and then Register a Custom Taxonomy for your new Post Type and set the rewrite argument to whatever you need.