3 ms·
Yes, you should because dealing with keeping that in sync between dev, staging, production is a major hassle. If you are changing your theme and using custom p
by jawngee 11y ago
Yes, you should because dealing with keeping that in sync between dev, staging, production is a major hassle.
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.
- joeguilmette 11y agoThere are pros and cons for both methods. 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.
- CM30 11y agoNot really. If you're not running a test site, put the theme and custom plugins inside another folder and commit that to Git or SVN. If you are running a test site, oommit the wp-content folder, with the uploads directory and any third party code set as ignored. 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-types-belong-in-plugins http://justintadlock.com/archives/2013/09/14/why-custom-post... http://www.wpbeginner.com/opinion/wordpress-custom-post-types-debate-functions-php-or-plugins/ http://www.wpbeginner.com/opinion/wordpress-custom-post-type... https://www.smashingmagazine.com/2012/11/complete-guide-custom-post-types/ https://www.smashingmagazine.com/2012/11/complete-guide-cust...