Is it possible to create taxonomies based on theme settings? That is, are theme settings actions run before taxonomies / post types are initialized?
1 Answer
Yes. Post types and taxonomies are (should be) registered on the init
hook. You are able to use get_option
inside that hook to retrieve your theme's settings and register your post type/taxonomy with args based on those settings.
(By the way post types and taxonomies are really plug-in territory... :) )
-
Thanks for the answer! Regarding the plugin territory - I know it, and you're right in most of the cases. I'm not a fan of throwing everything and a kitchen sink into the theme, but once you want to create complete solution to a certain problem, that is design plus functionality then theme is the only way to go. :) May 7, 2012 at 0:52
-
1@pogoking, consider having a theme require a plugin ... wordpress.stackexchange.com/a/51087/9844– mrwwebMay 7, 2012 at 2:07