Case Studies
if ( ! function_exists('case_studies') ) {
// Register Custom Post Type
function case_studies() {
$labels = array(
'name' => 'Case Studies',
'singular_name' => 'Case Study',
'menu_name' => 'Case Study',
'parent_item_colon' => 'Parent case study:',
'all_items' => 'All case studies',
'view_item' => 'View case study',
'add_new_item' => 'Add New case study',
'add_new' => 'Add New',
'edit_item' => 'Edit case study',
'update_item' => 'Update case study',
'search_items' => 'Search case study',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash',
);
$args = array(
'label' => 'case-study',
'description' => 'Case Studies',
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'custom-fields', ),
'taxonomies' => array( 'services' ),
'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( 'case-study', $args );
}
// Hook into the 'init' action
add_action( 'init', 'case_studies', 0 );
}