I set permalinks to Custom Structure
with these settings: /postCategory/%category%/%postname%/
.
Also I set up Category Base
to postCategory
.
And this will not work. When I visit post page I am getting page not found.
This produces:
for posts: example.org/postCategory/%category%/%postname% // this will output page not found
for categories: example.org/postCategory/%category% // this works
This doesn't work only when I use the same word for Category Base
and for prefix in post URL (in this case postCategory
).
So this doesnt work:
Custom Structure: /postCategory/%category%/%postname%/
Category Base: postCategory
and this will work:
Custom Structure: /postCategory/%category%/%postname%/
Category Base: postCategories
So my questions is how I can get this work. To have the same word for Category Base
and in permalinks for post.
These are my permalinks settings:
http://pokit.org/get/img/8a33b710bf98f9e3658edaaf8343cc3b.jpg
EDIT:
I found something similiar here:
But I don't really understand how to set this function "add_rewrite_rule" for my case:
I have this problem with my custom post type: "product" and custom taxonomy: "product_cat" and want to use "vaporizers" for category base and in permalinks for "product"
So this is my desired setting for permalinks:
http://pokit.org/get/img/bad3b8bea220768b60bb73d49657974a.jpg
And the result for category should be:
www.example.com/vaporizers/product_cat_name
For product:
www.example.com/vaporizers/product_cat_name/product_name