<?php
/**
 * Created by PhpStorm.
 * User: adiardana
 * Date: 21/04/19
 * Time: 23.42
 */
function register_cpt() {
    $args = array(
        'public' => true,
        'label'  => 'Law Facts',
        'supports' => array(
            'title', 'editor'
        ),
        'show_in_rest' => true
    );
    register_post_type( 'law_fact', $args );
}
add_action( 'init', 'register_cpt' );