The page on permalinks suggests that %category% will display the subcategories as well as nested directories in the URI, but they do not appear with posts. http://codex.wordpress.org/Using_Permalinks#Structure_Tags
I am using /%category%/%postname% for my structure and I want the links to posts to include categories and subcategories but only categories are used in the URI.
I am using 2.0.1
Can anyone point me to the code where %category% is interpreted to see if I can find a way to code the subcategories in?
ManuelViloria
Member
Posted 3 years ago #
Hi! If you create a parent category with a child category, when you Write a Post, associate the post with the child category. Do not check the parent category box.
When you do that (and assuming your permalink is set to /%category%/%postname%) your URL will look like
example.com/parentcateg/childcateg/title-of-your-post
Please note that
example.com/parentcateg/childcateg
will yield a 404 page
While
example.com/parentcateg
will be a duplicate of
example.com/categories/parentcateg
(assuming you didn't define anything for Categories in your Permalinks set-up)
Exactly what I wanted to know! I'm such a simpleton.