How to force both category and sub-category in permalinks?
-
Hello,
I’ve looked everywhere, and it seems to be an issue with WP. I am giving my posts a parent and a child (category and subcategory) to make things more organized, but for some reason, wordpress cannot do that to all posts.
My permalinks structure is as follows: example.com/%category%/%postname%/
Now according to WP it should show both the parent and the child in the URI (site.tld/parent/child/post), but it doesn’t. After a lot of research, it turns out the only way to force it to do that properly is to give the parent a greater ID number than the child, which seems like a primitive tempo fix as it only makes things worse. What if I keep adding subcategories to that parent? That means I will have to keep on tinkering with my database on a regular basis. Is it possible to give the parent an ID of 9000 without causing conflicts with WP category creating system?
Many suggested that I only select the sub-category from the post edit page, but this is not solving the issue. In fact, it is making it more messy. I want both categories to be added and both of them to be in the permalinks, in an organized way.
Sorry for the long post, but I’ve been looking everywhere for a solution.
Thanks in advance.
- The topic ‘How to force both category and sub-category in permalinks?’ is closed to new replies.