Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a way to define a custom post type independent from a theme? All sources I found in the web do that in the theme, fuctions.php or via including other theme-specific php-files. But in my eyes this makes no sense. Where is the separation between content (custom post type) and layout (theme)?

An other problem I see is changing the theme. Data is still in database, I know, but no way to edit or add new items.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Is there a way to define a custom post type independent from a theme?

Of course, put the Custom Post Type definition in a plugin. Short answer, and kind of obvious, but I am not sure what else to add.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.