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…
-
1Might 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/…– MichelleCommented 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.– PhpDoeCommented Jun 10, 2020 at 7:38
Add a comment
|
1 Answer
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
-
-
3Note 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 JCommented Jun 8, 2020 at 16:40