I have a custom WordPress theme and a main menu on top. This menu has links to different pages, one of them is a link to a Category (archive). It works fine for any first level category, but if I link to a child category with the full path, then I get a 404.
So this works: http://www.domain.com/my-level1-category
But this doesn’t: http://www.domain.com/my-level1-category/level2
However this works: But this doesn’t: http://www.domain.com/level2
I have a custom category.php file that is loaded when I only put one category in the URL; if I add the parent category/categories, then I get a 404 page. I would like to show categories under the category in the URL, and if there are none, I don’t want a 404 page anyway, I’d like to show something else instead.
My settings are:
Custom structure: /%category%/%postname%/
Category base: . (because I don’t want /category/ in the URL).
What am I missing? This sounds like something simple but I haven’t been able to fix it.
Read more here:: WordPress subcategories return 404 in custom template