Cru Store Authors
// Register Custom Post Type
function custom_post_type_authors() {
$labels = array(
'name' => 'Authors',
'singular_name' => 'Author',
'menu_name' => 'Authors',
'name_admin_bar' => 'Author',
'archives' => 'Author Archives',
'attributes' => 'Author Attributes',
'parent_item_colon' => 'Parent Author:',
'all_items' => 'All Authors',
'add_new_item' => 'Add New Author',
'add_new' => 'Add New',
'new_item' => 'New Author',
'edit_item' => 'Edit Author',
'update_item' => 'Update Author',
'view_item' => 'View Author',
'view_items' => 'View Authors',
'search_items' => 'Search Author',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
'featured_image' => 'Featured Image',
'set_featured_image' => 'Set featured image',
'remove_featured_image' => 'Remove featured image',
'use_featured_image' => 'Use as featured image',
'insert_into_item' => 'Insert into author',
'uploaded_to_this_item' => 'Uploaded to this author',
'items_list' => 'Authors list',
'items_list_navigation' => 'Authors list navigation',
'filter_items_list' => 'Filter authors list',
);
$rewrite = array(
'slug' => 'author',
'with_front' => true,
'pages' => true,
'feeds' => false,
);
$args = array(
'label' => 'Author',
'description' => 'Cru Store Authors',
'labels' => $labels,
'supports' => array( 'title', 'editor' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-edit',
'show_in_admin_bar' => false,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'query_var' => 'author',
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'crustore_authors', $args );
}
add_action( 'init', 'custom_post_type_authors', 0 );