Character CPT
// Register Custom Post Type
function cpts() {
$labels = array(
'name' => 'Characters',
'singular_name' => 'Character',
'menu_name' => 'Characters',
'parent_item_colon' => 'Parent Character:',
'all_items' => 'All Characters',
'view_item' => 'View Character',
'add_new_item' => 'Add New Character',
'add_new' => 'Add New',
'edit_item' => 'Edit Character',
'update_item' => 'Update Character',
'search_items' => 'Search Characters',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
);
$args = array(
'label' => 'character',
'description' => 'Character cheat sheet',
'labels' => $labels,
'supports' => array( 'title', 'author', 'thumbnail', 'revisions', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'character', $args );
}
// Hook into the 'init' action
add_action( 'init', 'cpts', 0 );