Register_post_type WordPress

register_post_type(
        'postname',
        // CPT Options
        array(
            'labels' => array(
                'name' => __('Postname'),
                'singular_name' => __('Postname')
            ),
            'public' => true,
            'has_archive' => true,
            'rewrite' => array('slug' => 'postname'),
            'show_in_rest' => true,
            'supports' => array('title', 'editor', 'thumbnail'),
            'capability_type' => 'post',
            'taxonomies' => array('category')
        )
    );
Ivan Cuaco