You can created new Post Type in WordPress using the following code.
Whats is Post Type:
WordPress can hold and display many different types of content. A single item of such a content is generally called a post, although post is also a specific post type. Internally, all the post types are stored in the same place, in the wp_posts database table, but are differentiated by a column called post_type.
<?php function create_post_type() { $labels = array( 'name' => 'Projects', 'singular_name' => 'Project', 'menu_name' => 'Projects', 'name_admin_bar' => 'Project', 'add_new' => 'Add New', 'add_new_item' => 'Add New Project', 'new_item' => 'New Project', 'edit_item' => 'Edit Project', 'view_item' => 'View Project', 'all_items' => 'All Projects', 'search_items' => 'Search Projects', 'parent_item_colon' => 'Parent Project', 'not_found' => 'No Projects Found', 'not_found_in_trash' => 'No Projects Found in Trash' ); $args = array( 'labels' => $labels, 'public' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_nav_menus' => true, 'show_in_menu' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-admin-appearance', 'capability_type' => 'post', 'hierarchical' => false, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ), 'has_archive' => true, 'rewrite' => array( 'slug' => 'projects' ), 'query_var' => true ); register_post_type( 'sm_project', $args ); } ?>