https://codex.wordpress.org/Post_Types
You should be defining them in your theme anyways for source control.
https://codex.wordpress.org/Post_Types
You should be defining them in your theme anyways for source control.
And I do think even though this API exists, it should definitely be improved upon and given a built in interface. I mean, don't other CMS scripts like Drupal provide a way to add custom fields and things in core, via a visual interface?
If you are changing your theme and using custom post types, you still have to modify the theme to support the custom post types. So copy and paste, or isolate the custom post types to a separate file and include in your functions.php.
If you're doing it any other way, then you honestly don't really know what you are doing.
And the way I suggest is also what a lot of WordPress experts suggest, as seen here:
http://justintadlock.com/archives/2013/09/14/why-custom-post...
http://www.wpbeginner.com/opinion/wordpress-custom-post-type...
https://www.smashingmagazine.com/2012/11/complete-guide-cust...
Personally, I much prefer to put functionality in a plugin and the theme limited to the frontend presentation. To suggest that I don't know what I'm doing is, well... Incorrect.
Syncing production, staging, and dev is an unrelated and solved problem.