admin管理员组文章数量:1306822
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:
But this doesn't:
However this works: But this doesn't:
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:
Permalinks:
- 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.
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/my-level1-category
But this doesn't: http://www.domain/my-level1-category/level2
However this works: But this doesn't: http://www.domain/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:
Permalinks:
- 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.
Share Improve this question asked Mar 13, 2018 at 17:34 Luis SerranoLuis Serrano 1316 bronze badges1 Answer
Reset to default 2I have seen the magic "." break a lot of sites paginations and do errors to such issues as yours (return status 404 for subcategories). Try installing a plugin named "WP No category base" (link below) and remove that dot from the category base. Save permalinks a few times after installing plugin and hope that works (it did for me!).
http://wordpress/plugins/wp-no-category-base/
本文标签: categoriesWordpress subcategories return 404 in custom template
版权声明:本文标题:categories - Wordpress subcategories return 404 in custom template 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741806684a2398545.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论