register_post_type('slider', array( 'label' => 'Slider','description' => '','public' => true,'show_ui' => true,'show_in_menu' => true,'capability_type' => 'post','hierarchical' => false,'rewrite' => array('slug' => ''),'query_var' => true,'supports' => array('title','editor','thumbnail',),'labels' => array ( 'name' => 'Slider', 'singular_name' => 'Slider', 'menu_name' => 'Slider', 'add_new' => 'Add Slider', 'add_new_item' => 'Add New Slider', 'edit' => 'Edit', 'edit_item' => 'Edit Slider', 'new_item' => 'New Slider', 'view' => 'View Slider', 'view_item' => 'View Slider', 'search_items' => 'Search Slider', 'not_found' => 'No Slider Found', 'not_found_in_trash' => 'No Slider Found in Trash', 'parent' => 'Parent Slider', ),) );
Adding a Custom Post Type to WordPress Admin
May 22nd, 2012 by Marcos Nobre
To add a Custom Post Type to the admin of wordpress place this code in the functions.php file of your theme.
Replace “Slider” with the name of your custom post type.