Single page not working for custom post type

Add this to your functions.php:

/* Flush rewrite rules for custom post types. */
add_action( 'after_switch_theme', 'bt_flush_rewrite_rules' );

/* Flush your rewrite rules */
function bt_flush_rewrite_rules() {
     flush_rewrite_rules();
}

Then change your theme to a different theme and then set it back again to your custom theme.
This will flush the rewrite rule and making the custom post working properly.