【发布时间】:2014-06-15 13:10:06
【问题描述】:
我是 WordPress 新手,我想为食谱网站创建一个 url 结构。
/category(例如:/recipe 将列出所有食谱)。
/category/subcategory (eg: recipe/chicken list of chicken recipes)
/category/subcategory/postname(例如:recipe/chicken/Chicken-Breasts-with-Tomatoes
问题:
当我访问 /category/subcategory ( /recipe/chicken ) 时,我得到 404 未找到,但如果我访问 /subcategory ( 例如: /chicken ) 它可以工作。
我已将类别“食谱”标记为鸡肉的父级。
非常感谢, 恩格
【问题讨论】:
-
我假设您是通过分类法创建的,它不是内置帖子?发布该代码可能很有用,否则请尝试在管理面板中重新保存您的永久链接结构。
-
尝试重新保存永久链接设置,以便刷新永久链接缓存。还要确保您的永久链接设置确实正确,以识别类别下的子类别。
-
我的永久链接: /%category%/%postname%/ 。如何配置 wordpress 以识别类别下的子类别?
标签: wordpress http-status-code-404