We often need to add a new post type in WordPress beside the POST and PAGES menu.
Below is a sample PHP code below to write in the theme or plugin function file.
add_action( 'init', 'create_posttype_qr_code' );
function create_posttype_qr_code() {
register_post_type( 'ogpqrcode',
// CPT Options
array(
'labels' => array(
'name' => __( 'QR Code' ),
'singular_name' => __( 'QR Code' )
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'analyses'),
'show_in_rest' => true,
'supports' => array('title')
)
);
}
Feel free to contact our wordpress support if you need to install more advanced custom post type.