I have a post in wordpress which belongs to two categories - one is a parent and other is a child [like digital camera --> nikon] My permalink structure is like this /category/postid/ When i make a post, WP would generate the URL as ww.abc.com/digital-camera/nikon/382/ which is perfect. However, there are instances when WP won't add the sub-category nikon to the URL and it would then look like abc.com/digital-camera/382 Why does WP skip the sub-category. Any clues ?
not sure. if you use this structure /%category%/%postname%/ wordpress should display like this if you posted the article in chile category /category/child-category/postname/ btw why did you use postid instead of postname? -cypher.
Here's the exact structure of the permalink: /%category%/%postname%/%post_id%/ This should produce URL as /category/child-category/postname/ but sometimes the child-category is missing from the URL.
im not sure why it be like that. it suppose to be like i described in my earlier post. or maybe you set the entry to be published in category and child category? -cypher.
yes if you set the post in category and subcategory both the the url produced will be: /category/postname/ if you set it to subcategory only then you will have what you desire: /category/child-category/postname/
thanks for this thread, evne though its like 100 years old i was uncertain if i could do this same thing. then i found /%category%/%postname%/ but my post url was only showing the main parent category. but i had the parent and several sub categories checked, once i selected the latest sub category my urls display exactly how i wanted them to. thank you everyone for being awesome enough to help people here!
What if you have a product that goes in two separate categories that aren't parent/child? How can I get the URL to include both categorie slugs?