Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Custom Post Type: Case Studies
- add_action('init', 'case_study_register');
- function case_study_register() {
- $labels = array(
- 'name' => _x( 'Case Studies', 'post type general name' ),
- 'singular_name' => _x( 'Case Study', 'post type singular name' ),
- 'add_new' => __( 'Add New Case Study' ),
- 'add_new_item' => __( 'Add New Case Study' ),
- 'edit_item' => __( 'Edit Case Study' ),
- 'new_item' => __( 'New Case Study' ),
- 'view_item' => __( 'View Case Study' ),
- 'search_items' => __( 'Search Case Studies' ),
- 'not_found' => __( 'No case studies found.' ),
- 'not_found_in_trash' => __( 'No case studies found in Trash.' ),
- 'menu_name' => __( 'Case Studies' ),
- );
- $args = array(
- 'labels' => $labels,
- 'description' => 'Client case studies.',
- 'public' => true,
- 'publicly_queryable' => true,
- 'exclude_from_search' => true,
- 'show_ui' => true,
- 'menu_position' => 20,
- 'menu_icon' => null,
- 'capability_type' => post,
- 'hierarchical' => false,
- 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'post-formats'),
- 'taxonomies' => array('category', 'post_tag', ),
- 'rewrite' => false,
- 'query_var' => true,
- 'can_export' => true,
- 'show_in_nav_menus' => true,
- );
- register_post_type('case_study', $args);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement