I'm trying to create new taxonomies. What is the best practice? Many thanks.
This question already has answers here: Where to put my code: plugin or functions.php? (7 answers) Closed 5 years ago.I'm trying to create new taxonomies. What is the best practice? Many thanks.
Share Improve this question asked Feb 7, 2020 at 17:23 duncanduncan 12 bronze badges 01 Answer
Reset to default -1I think it depends on the case. If the taxonomy is essential part of the theme, then functions.php might be appropriate place for registering it. If the taxonomy doesn't care which theme is in use on the site, then a custom plugin might be better place for it.
Please note that asking about best practices isn't quite on topic here as they can get rather opinion-based.
From meta: How should I ask for best practices (or should I not ask)?