Title: ThemeCheck: register_post_type()
Last modified: August 31, 2016

---

# ThemeCheck: register_post_type()

 *  Resolved [LearningDesigner](https://wordpress.org/support/users/learningdesigner/)
 * (@learningdesigner)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/themecheck-register_post_type/)
 * Hey there,
 * I’m trying to make my very first Theme to send out for publishing.
 * I got the ThemeCheck plugin and did a check-up.
    It gave me a few REQUIRED-tags.
 * Most of them have been fixed, except for one.
    And I cannot find a good, clear
   way to get this solved.
 * The ThemeCheck gives me this:
    REQUIRED: The theme uses the register_post_type()
   function, which is plugin-territory functionality.
 * Can someone please explain me, perferably clearly, how I can solve this issue?
 * Thank you all !

Viewing 1 replies (of 1 total)

 *  Thread Starter [LearningDesigner](https://wordpress.org/support/users/learningdesigner/)
 * (@learningdesigner)
 * [10 years ago](https://wordpress.org/support/topic/themecheck-register_post_type/#post-7282838)
 * Just to make it more specific:
 * I have, regarding the register_post_type, this in my **function.php**
 *     ```
       // register custom post type 'my_custom_post_type'
       add_action( 'init', 'create_my_post_type' );
       function create_my_post_type() {
           register_post_type( 'my_custom_post_type',
             array(
               'labels' => array( 'name' => __( 'Products' ) ),
               'public' => true
           )
         );
       }
       ```
   
 * and
 *     ```
       // Create 1 Custom Post type for a Demo, called HTML5-Blank
       function create_post_type_html5()
       {
           register_taxonomy_for_object_type('category', 'html5-blank'); // Register Taxonomies for Category
           register_taxonomy_for_object_type('post_tag', 'html5-blank');
           register_post_type('html5-blank', // Register Custom Post Type
               array(
               'labels' => array(
                   'name' => __('HTML5 Blank Custom Post', 'html5blank'), // Rename these to suit
                   'singular_name' => __('HTML5 Blank Custom Post', 'html5blank'),
                   'add_new' => __('Add New', 'html5blank'),
                   'add_new_item' => __('Add New HTML5 Blank Custom Post', 'html5blank'),
                   'edit' => __('Edit', 'html5blank'),
                   'edit_item' => __('Edit HTML5 Blank Custom Post', 'html5blank'),
                   'new_item' => __('New HTML5 Blank Custom Post', 'html5blank'),
                   'view' => __('View HTML5 Blank Custom Post', 'html5blank'),
                   'view_item' => __('View HTML5 Blank Custom Post', 'html5blank'),
                   'search_items' => __('Search HTML5 Blank Custom Post', 'html5blank'),
                   'not_found' => __('No HTML5 Blank Custom Posts found', 'html5blank'),
                   'not_found_in_trash' => __('No HTML5 Blank Custom Posts found in Trash', 'html5blank')
               ),
               'public' => true,
               'hierarchical' => true, // Allows your posts to behave like Hierarchy Pages
               'has_archive' => true,
               'supports' => array(
                   'title',
                   'editor',
                   'excerpt',
                   'thumbnail'
               ), // Go to Dashboard Custom HTML5 Blank post for supports
               'can_export' => true, // Allows export in Tools > Export
               'taxonomies' => array(
                   'post_tag',
                   'category'
               ) // Add Category and Post Tags support
           ));
       }
       ```
   
 * ____
 * Please, I really need help on this one.

Viewing 1 replies (of 1 total)

The topic ‘ThemeCheck: register_post_type()’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [LearningDesigner](https://wordpress.org/support/users/learningdesigner/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/themecheck-register_post_type/#post-7282838)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
