Follow this tutorial to create a new custom post type like "Project" in this example.
<?php
/*
Plugin Name: Custom Post Types
Description: Add post types for custom project
Author: Sikka Software
*/
// Hook ss_custom_post_custom_article() to the init action hook
add_action( 'init', 'ss_custom_post_custom_project' );
// The custom function to register a custom article post type
function ss_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 array
register_post_type('project', $args);
}
Congratulations, now you have created a custom post type. To avoid conflict with other plugins, your custom function should have a prefix like ss_.