Study
// Register Custom Post Type
function studies_post_type() {
$labels = array(
'name' => _x( 'Studies', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Study', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Study', 'text_domain' ),
'parent_item_colon' => __( 'Parent Study:', 'text_domain' ),
'all_items' => __( 'All Studies', 'text_domain' ),
'view_item' => __( 'View Study', 'text_domain' ),
'add_new_item' => __( 'Add New Study', 'text_domain' ),
'add_new' => __( 'New Study', 'text_domain' ),
'edit_item' => __( 'Edit Study', 'text_domain' ),
'update_item' => __( 'Update Study', 'text_domain' ),
'search_items' => __( 'Search studies', 'text_domain' ),
'not_found' => __( 'No studies found', 'text_domain' ),
'not_found_in_trash' => __( 'No studies found in Trash', 'text_domain' ),
);
$args = array(
'label' => __( 'study', 'text_domain' ),
'description' => __( 'Examine relationship between two variables.', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'custom-fields', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => 'content: "\f239";',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'study', $args );
}
// Hook into the 'init' action
add_action( 'init', 'studies_post_type', 0 );