Acorn – Service
// Register Custom Post Type
function service_item() {
$labels = array(
'name' => _x( 'Service Items', 'Post Type General Name', 'roots' ),
'singular_name' => _x( 'Service Item', 'Post Type Singular Name', 'roots' ),
'menu_name' => __( 'Service Item', 'roots' ),
'parent_item_colon' => __( 'Parent Service Item:', 'roots' ),
'all_items' => __( 'All Service Items', 'roots' ),
'view_item' => __( 'View Service Item', 'roots' ),
'add_new_item' => __( 'Add New Service Item', 'roots' ),
'add_new' => __( 'New Service Item', 'roots' ),
'edit_item' => __( 'Edit Service Item', 'roots' ),
'update_item' => __( 'Update Service Item', 'roots' ),
'search_items' => __( 'Search Service items', 'roots' ),
'not_found' => __( 'No Service items found', 'roots' ),
'not_found_in_trash' => __( 'No Service items found in Trash', 'roots' ),
);
$args = array(
'label' => __( 'service', 'roots' ),
'description' => __( 'Service Items', 'roots' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', ),
'taxonomies' => array( 'category', 'service_tax' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-clipboard',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'service', $args );
}
// Hook into the 'init' action
add_action( 'init', 'service_item', 0 );