Title: Second Custom Post Type
Last modified: August 21, 2016

---

# Second Custom Post Type

 *  [aled2305](https://wordpress.org/support/users/aled2305/)
 * (@aled2305)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/second-custom-post-type/)
 * Hello, I have made a custom post type using the following code
 *     ```
       add_action( 'init', 'register_cpt_tutorial' );
   
       function register_cpt_tutorial() {
   
           $labels = array(
               'name' => _x( 'Tutorials', 'tutorial' ),
               'singular_name' => _x( 'Tutorial', 'tutorial' ),
               'add_new' => _x( 'Add New', 'tutorial' ),
               'add_new_item' => _x( 'Add New Tutorial', 'tutorial' ),
               'edit_item' => _x( 'Edit Tutorial', 'tutorial' ),
               'new_item' => _x( 'New Tutorial', 'tutorial' ),
               'view_item' => _x( 'View Tutorial', 'tutorial' ),
               'search_items' => _x( 'Search Tutorials', 'tutorial' ),
               'not_found' => _x( 'No tutorials found', 'tutorial' ),
               'not_found_in_trash' => _x( 'No tutorials found in Trash', 'tutorial' ),
               'parent_item_colon' => _x( 'Parent Tutorial:', 'tutorial' ),
               'menu_name' => _x( 'Tutorials', 'tutorial' ),
           );
   
           $args = array(
               'labels' => $labels,
               'hierarchical' => false,
               'description' => 'Tutorials description will be here',
               'supports' => array( 'title', 'editor', 'thumbnail', 'comments' ),
               'taxonomies' => array( 'category' ),
               'public' => true,
               'show_ui' => true,
               'show_in_menu' => true,
               'menu_position' => 20,
   
               'show_in_nav_menus' => true,
               'publicly_queryable' => true,
               'exclude_from_search' => false,
               'has_archive' => true,
               'query_var' => true,
               'can_export' => true,
               'rewrite' => true,
               'capability_type' => 'post'
           );
   
           register_post_type( 'tutorial', $args );
       }
       ```
   
 * If I copy and paste this code and change all of the tutorials to videos, it does
   not work, can someone tell me why?
 * Thanks

The topic ‘Second Custom Post Type’ is closed to new replies.

## Tags

 * [categorys](https://wordpress.org/support/topic-tag/categorys/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [aled2305](https://wordpress.org/support/users/aled2305/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/second-custom-post-type/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
