Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is it possible to create taxonomies based on theme settings? That is, are theme settings actions run before taxonomies / post types are initialized?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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... :) )

share|improve this answer
    
+1 on the plugin territory comment. –  mrwweb May 7 '12 at 0:45
    
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. :) –  Mateusz Hajdziony May 7 '12 at 0:52
1  
@pogoking, consider having a theme require a plugin ... wordpress.stackexchange.com/a/51087/9844 –  mrwweb May 7 '12 at 2:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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