admin管理员组文章数量:1122832
I made a mistake when creating a new custom taxonomy and custom post type. Here's the line in the custom taxonomy with the error...
register_taxonomy('resource-category', ['qp_resource'], $args);
The post type should be qp_resources
and not qp_resource
.
This error resulted in /resource-category/white-paper/
becoming /resources/?_sft_resource-category=white-paper
.
After I noticed the error, I fixed it and flushed permalinks, it's still converting to the query style URL. Just to check that it was not another issue, I created a new custom taxonomy resource-type
. It works fine with no issues. I also tried deleting resource-category
, uploading the plugin, flushing permalinks, re-adding resource-category
, reuploading and reflushing again with no luck.
I prefer to use resource-category
. Does anybody know what I can do to keep that and not have the URLs changed to queries?
I made a mistake when creating a new custom taxonomy and custom post type. Here's the line in the custom taxonomy with the error...
register_taxonomy('resource-category', ['qp_resource'], $args);
The post type should be qp_resources
and not qp_resource
.
This error resulted in /resource-category/white-paper/
becoming /resources/?_sft_resource-category=white-paper
.
After I noticed the error, I fixed it and flushed permalinks, it's still converting to the query style URL. Just to check that it was not another issue, I created a new custom taxonomy resource-type
. It works fine with no issues. I also tried deleting resource-category
, uploading the plugin, flushing permalinks, re-adding resource-category
, reuploading and reflushing again with no luck.
I prefer to use resource-category
. Does anybody know what I can do to keep that and not have the URLs changed to queries?
1 Answer
Reset to default 0To address the issue of your custom taxonomy resource-category not displaying correctly even after fixing the custom post type and flushing permalinks, you can follow these steps:
- Double-check the Registration Code.
- Flush Permalinks Again: Go to Settings > Permalinks and click on Save Changes. This will flush the rewrite rules and update the permalinks.
- Clear Caches: Ensure that any caching plugins or server-side caching are cleared. Sometimes, changes are not immediately reflected due to cached data.
- Check for Conflicts: Deactivate all other plugins and switch to a default theme (like Twenty Twenty-One) to check if there is any conflict causing the issue. If the problem is resolved, reactivate your plugins one by one and switch back to your theme to identify the conflict.
本文标签: url rewritingCustom taxonomy still using query URL after fixing error
版权声明:本文标题:url rewriting - Custom taxonomy still using query URL after fixing error 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736305678a1932675.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论