WordPress Custom Post Types Custom Post Type using Twenty Fifteen WordPress Theme


Example

You can use any name for the function.

function custom_postype(){
    register_post_type('cus_post',array(

        'labels'=>array(
            'name'=>'khaiyam'// Use any name you want to show in menu for your users
            ),
        'public'=>true,// **Must required 
        'supports'=>array('title','editor','thumbnail')// Features you want to provide on your posts
        )); 
}
add_action('after_setup_theme','custom_postytpe'); 

or

add_action('init','custom_postytpe');

You can use any of the hooks you want but of course they have different meaning and uses.

Simple-custom Post Type