Custom Post Type Definition should not be in the theme – how?

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.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)