How to register a custom post type in WordPress
/* Add a post type named projects */
add_action( 'init', function() {
register_post_type( 'projects', [
'label' => 'Projects',
'public' => true,
]);
});
/* Add a post type named projects */
add_action( 'init', function() {
register_post_type( 'projects', [
'label' => 'Projects',
'public' => true,
]);
});