Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- register_taxonomy_for_object_type('category','document');
- 'taxonomies' => array('category',),
- $labels = array(
- 'name' => _x('Document', 'post type general name', 'creative'),
- 'singular_name' => _x('Document', 'post type singular name', 'creative'),
- 'add_new' => _x('Add New', 'post type new', 'creative'),
- 'add_new_item' => __('Add New Document', 'creative'),
- 'edit_item' => __('Edit Document', 'creative'),
- 'new_item' => __('New Document', 'creative'),
- 'view_item' => __('View Document', 'creative'),
- 'search_items' => __('Search Documents', 'creative'),
- 'not_found' => __('No Documents found', 'creative'),
- 'not_found_in_trash' => __('No Documents found in Trash', 'creative'),
- 'parent_item_colon' => '',
- 'menu_name' => 'Documents'
- );
- $args = array(
- 'labels' => $labels,
- 'taxonomies' => array('category',),
- 'public' => true,
- 'publicly_queryable' => true,
- 'show_ui' => true,
- 'show_in_menu' => true,
- 'query_var' => true,
- 'rewrite' => true,
- 'capability_type' => 'post',
- 'has_archive' => false,
- 'hierarchical' => true,
- 'menu_position' => 20,
- 'menu_icon' => 'dashicons-media-default',
- 'supports' => array( 'title', 'editor', 'thumbnail' )
- );
- register_post_type( 'document', $args);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement