Move the custom post types to a plugin. They should never be part of a theme for exactly the reason you asked here. 🙂
In your theme add just the needed template files, but not the code for post type registration.
Related Posts:
- WP 3.4 – what action/hook is called when theme customisation is saved?
- Add a dropdown to theme customizer
- Is it good to rename theme folder downloaded from WordPress.org?
- What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
- Is it possible to use line break in theme description?
- Is the theme customizer slowing down my site?
- How can I get wp_head() as a string instead of echoing it?
- Grab the first paragraph of each post
- How to check if post has any tag?
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- Example of a theme organization without all the default wp files in root
- Which is the simplest theme for WordPress to use it as your base?
- “Cheatin’ uh?” error message on multple theme directories
- Adding WordPress colorpicker in widget settings
- Disable the Custom Internal CSS added by theme.json for Certain Pages
- Unwanted blank lines before tag
- A theme that follows all the best practices to learn from?
- get_post() function returns post even if it is trashed
- How to highlight the current page in the nav menu?
- “Display Site Title and Tagline” checkbox not working?
- Add social icons in a theme through custom admin menu
- file_get_contents Not allowed in Themes?
- Custom Nav Walker Displaying Values in Sub Menu
- How to configure wordpress to work with Vuejs with SSR and without hashbang
- How do I remove twentyten without ruining what I did?
- Custom theme not visible in Appearance
- Some doubts about how to show posts in a custom theme?
- Can’t delete theme
- How to add a second stylesheet to the editor
- Developing WordPress Theme using CSS framework like Bootstrap
- WP_Customize_Color_Control omitting # symbol
- Single Page theme [closed]
- Theme translation not applying
- How to add filter the post thumbnail before save in database?
- Can I have two different theme for two different language?
- Storefront child theme not applying parent theme [closed]
- WP_Comment_Query – Get comments and answers separately
- excerpt() shows different result between remote and localhost(development environment)
- Theme Javascript.php Overwritten Nightly [closed]
- Theme Inspector “X-Ray”
- Acivate all themes multisite wide automatically
- How to place HTML tags in content from the_content()?
- WordPress Theme Creation [closed]
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- Integrate WooCommerce theme with a WordPress theme [closed]
- Automated Footer information
- How do you use WordPress for a website that’s not in a blog format?
- Managing WordPress Theme
- theme style is applied on the dhasboard rather than the website
- Alignment Problem [closed]
- What $handle does WordPress use for a theme’s implicit style.css?
- How to track a users last visited page?
- In a Gallery with limited image posts, how do I not limit images on single post?
- LESS not working in WordPress [closed]
- Unwanted empty line at the beginning of document
- How to add custom page elements to the WYSIWYG editor?
- Why is my container argument not working for wp_nav_menu() [closed]
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- How to use the _S framework
- help needed for suit designing tool
- Open portfolio image in light box
- Let visitors show/hide a type of content
- Best practice for implementing a blog page / section in wp_menu_nav()
- How to modify theme content in Thematic?
- how to add a badge on product based on filter?
- how to create/register menu items that can be added to menus later
- My wordpress theme name isn’t updating straight away
- Why nav_menu_css_class doesn’t work with apply_filters?
- WordPress and Semantic UI
- Customizer API Multi Sections in single Panel
- WordPress theme options checkbox default checked state
- Theme does not allow shortcodes
- Text widget is placing everything side by side. I want to post it above
- What is an alternative to not using child theme to customize a WordPress theme?
- Creating a theme just to deploy a single page
- Menu names not getting translated
- How to generate a rtl.css file for themes?
- Get property of non-object on theme activation
- change wordpress website logo url [duplicate]
- wp_editor some functionality not working on custom theme
- Update modified Shopify third-party theme [closed]
- hide/show a div in wordpress
- Providing updates to your WordPress theme
- One-Page WordPress Template
- Weird ‘theme update’ error [duplicate]
- How one category can have different fields?
- How do child themes work?
- Fail to install theme on development copy of WordPress on Webmatrix
- How to prevent XSS attack in wordpress theme?
- Featured Image Module Randomly Disappears
- WordPress two sidebar layout or theme
- adding navigation to genesis themes
- Show post thumbnail only if it exists using timthumb
- Getting all months in one year WordPress Archive
- .submenu class missing in output from wp_nav_menu
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?
- Dynamic nav menu with icons [closed]
- TItle In Latest Post is not using H1 Tag [closed]
- Is via.placeholder.com a good site to auto-generate placeholder images?
- Should we escape the values of constants?