Follow this tutorial to create a new custom post type like "Project" in this example.
Go to the directory of the wordpress website in public_html/wp-content/plugins
Create a new folder and name it custom-post-type
Create a file inside that folder and name it custom-post-type.php
Copy the following code inside that php file and save it
<?php/*Plugin Name: Custom Post TypesDescription: Add post types for custom projectAuthor: Sikka Software*/// Hook ss_custom_post_custom_article() to the init action hookadd_action('init','ss_custom_post_custom_project');// The custom function to register a custom article post typefunctionss_custom_post_custom_project() {// Set the labels. This variable is used in the $args array $labels =array('name'=>__('Custom Projects'),'singular_name'=>__('Custom Project'),'add_new'=>__('Add New Custom Project'),'add_new_item'=>__('Add New Custom Project'),'edit_item'=>__('Edit Custom Project'),'new_item'=>__('New Custom Project'),'all_items'=>__('All Custom Project'),'view_item'=>__('View Custom Project'),'search_items'=>__('Search Custom Project'),'featured_image'=>'Poster','set_featured_image'=>'Add Poster' );// The arguments for our post type, to be entered as parameter 2 of register_post_type() $args =array('labels'=> $labels,'description'=>'Holds our custom project post specific data','public'=>true,'menu_position'=>5,'supports'=>array( 'title','editor','thumbnail','excerpt','comments','custom-fields' ),'has_archive'=>true,'show_in_admin_bar'=>true,'show_in_nav_menus'=>true,'query_var'=>true, );// Call the actual WordPress function// Parameter 1 is a name for the post type// Parameter 2 is the $args arrayregister_post_type('project', $args);}
Navigate to the website admin dashboard and activiate the plugin
Congratulations, now you have created a custom post type. To avoid conflict with other plugins, your custom function should have a prefix like ss_.