Note Custom Post – StrateusisWidgets
// Register Custom Post Type
function custom_post_type_notes() {
$labels = array(
'name' => 'Notes',
'singular_name' => 'Note',
'menu_name' => 'Notes',
'parent_item_colon' => 'Parent Note:',
'all_items' => 'All Notes',
'view_item' => 'View Note',
'add_new_item' => 'Add New Note',
'add_new' => 'Add New',
'edit_item' => 'Edit Note',
'update_item' => 'Update Note',
'search_items' => 'Search Notes',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
);
$args = array(
'label' => 'post_type_notes',
'description' => 'Notes',
'labels' => $labels,
'supports' => array( 'title', 'editor', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-clipboard',
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'post_type_notes', $args );
}
// Hook into the 'init' action
add_action( 'init', 'custom_post_type_notes', 0 );