1

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…

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.org/reference/functions/…
    – Michelle
    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
    Jun 10, 2020 at 7:38

1 Answer 1

0

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

https://codex.wordpress.org/Reserved_Terms

Reserved terms

  • attachment_id
  • author
  • author_name
  • calendar
  • cat
  • category
  • category__and
  • category__in
  • category__not_in
2
  • Thanks for the link : it's exactly what i was looking for !
    – PhpDoe
    Jun 8, 2020 at 16:26
  • 3
    Note that there's nothing stopping you from using the word "Category" in the label(s) of the taxonomy; you just can't do, eg, register_taxonomy( 'category', $args ); . Be aware, though, that using "Category" in the label(s) may cause confusion to your users. I'd recommend using something like "{Post Type} Category" instead.
    – Pat J
    Jun 8, 2020 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.