wordpress custom post type shows other cpt posts in admin menu

i don’t know why but the problem solved after i deleted the following question code from my function.php file

    // Show posts of 'post', and 'news' post types on archive page
    add_action( 'pre_get_posts', 'add_my_post_types_to_query' );

    function add_my_post_types_to_query( $query ) {
        if ( is_archive() && $query->is_main_query() )
            $query->set( 'post_type', array( 'post', 'news' ) );
        return $query;
    }

https://wordpress.stackexchange.com/a/136115/94280