Avoid custom functionality inside your theme
Be it a custom theme or a third-party theme, a WordPress theme should only deal with the look and feel of the website.
It shouldn’t deal with the content or functionality of the website by any means.
This is to ensure that no content on your website is lost when you switch themes.
So, make sure your theme doesn’t contain:
- Registration of custom post types
- Registration of custom taxonomies
- Hard-coded content inside the theme’s template files
If your theme has any of these, move them to a custom plugin.