Custom Post Types and Broken Permalinks

You need to flush rewrite rules on plugin activation for your custom post type to begin working.

register_deactivation_hook( __FILE__, 'flush_rewrite_rules' );
register_activation_hook( __FILE__, 'myplugin_flush_rewrites' );
function myplugin_flush_rewrites() {
    // call your CPT registration function here
    // (it should also be hooked into 'init')
    dwwp_register_post_type();
    flush_rewrite_rules();
}

You may have noticed it randomly working without having to do this, if some other code flushed rules, such as when you visit the Settings > Permalinks admin page.