最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Can a Custom Taxonomy be named "category" like normal Posts?

programmeradmin0浏览0评论

Is it fine to call a Custom Taxonomy (created to store Custom Post Type) "Category" like it is already the case for normal Posts, and to use all the terminology ("Categories", "Create a new category", etc.) ? I mean, are there any risk of instability or compatibility issues if I do so ? Like for example : taxonomy overridden, etc…

Is it fine to call a Custom Taxonomy (created to store Custom Post Type) "Category" like it is already the case for normal Posts, and to use all the terminology ("Categories", "Create a new category", etc.) ? I mean, are there any risk of instability or compatibility issues if I do so ? Like for example : taxonomy overridden, etc…

Share Improve this question edited Jun 8, 2020 at 16:19 PhpDoe asked Jun 8, 2020 at 16:13 PhpDoePhpDoe 2992 silver badges11 bronze badges 2
  • 1 Might not be what you're looking for but fwiw you can associate the default 'category' taxonomy with your new Custom Post Type - see the examples on this page that show how to associate 'category' with Pages as well as Posts, for example: developer.wordpress/reference/functions/… – Michelle Commented Jun 9, 2020 at 19:16
  • Very useful, thanks ! I'm just wondering if the performance are the same. I mean, using an already registered taxonomy (category in this case) might have consequences with the queries, the database, etc., if I use this taxonomy for a big amount of posts. – PhpDoe Commented Jun 10, 2020 at 7:38
Add a comment  | 

1 Answer 1

Reset to default 0

No. "Category" is one of WordPress reserved terms.

https://codex.wordpress/Reserved_Terms

Reserved terms

  • attachment_id
  • author
  • author_name
  • calendar
  • cat
  • category
  • category__and
  • category__in
  • category__not_in
发布评论

评论列表(0)

  1. 暂无评论