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?

Share Improve this question asked May 30, 2024 at 4:05 juusuijuusui 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

To 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:

  1. Double-check the Registration Code.
  2. Flush Permalinks Again: Go to Settings > Permalinks and click on Save Changes. This will flush the rewrite rules and update the permalinks.
  3. Clear Caches: Ensure that any caching plugins or server-side caching are cleared. Sometimes, changes are not immediately reflected due to cached data.
  4. 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