byronyasgur
Member
Posted 1 year ago #
Sorrry to bother you but I have spend hours trying to figure out how to register a custom post type VIA A FORM SUBMISSION like how custom post type UI does it and I just thought ... well why not just ask .... so maybe if it's not a trade secret you'd share it with me ( for all i know it's commonly known but i couldnt find out how anyhow - code always seems to need add_action('init' .. )
http://wordpress.org/extend/plugins/custom-post-type-ui/
Brad Williams
Member
Posted 1 year ago #
Yes using the init action hook you can register post types when WordPress is initialized. I'm basically storing an array of custom post types as a single option in WordPress. Then I retrieve that option on init and register the post types defined. Check out the code for the plugin, it's pretty easy to follow.