job Post type
if ( ! function_exists('sumo_jobs') ) {
// Register Custom Post Type
function sumo_jobs() {
$labels = array(
'name' => _x( 'Jobs', 'Post Type General Name', 'sumogrill' ),
'singular_name' => _x( 'Job', 'Post Type Singular Name', 'sumogrill' ),
'menu_name' => __( 'Jobs', 'sumogrill' ),
'name_admin_bar' => __( 'Job', 'sumogrill' ),
'archives' => __( 'Job Archives', 'sumogrill' ),
'attributes' => __( 'Job Attributes', 'sumogrill' ),
'parent_item_colon' => __( 'Parent Job:', 'sumogrill' ),
'all_items' => __( 'All Jobs', 'sumogrill' ),
'add_new_item' => __( 'Add New Job', 'sumogrill' ),
'add_new' => __( 'Add New', 'sumogrill' ),
'new_item' => __( 'New Job', 'sumogrill' ),
'edit_item' => __( 'Edit Job', 'sumogrill' ),
'update_item' => __( 'Update Job', 'sumogrill' ),
'view_item' => __( 'View Job', 'sumogrill' ),
'view_items' => __( 'View Jobs', 'sumogrill' ),
'search_items' => __( 'Search Job', 'sumogrill' ),
'not_found' => __( 'Not found', 'sumogrill' ),
'not_found_in_trash' => __( 'Not found in Trash', 'sumogrill' ),
'featured_image' => __( 'Featured Image', 'sumogrill' ),
'set_featured_image' => __( 'Set featured image', 'sumogrill' ),
'remove_featured_image' => __( 'Remove featured image', 'sumogrill' ),
'use_featured_image' => __( 'Use as featured image', 'sumogrill' ),
'insert_into_item' => __( 'Insert into Job', 'sumogrill' ),
'uploaded_to_this_item' => __( 'Uploaded to this Job', 'sumogrill' ),
'items_list' => __( 'Jobs list', 'sumogrill' ),
'items_list_navigation' => __( 'Jobs list navigation', 'sumogrill' ),
'filter_items_list' => __( 'Filter Jobs list', 'sumogrill' ),
);
$args = array(
'label' => __( 'Job', 'sumogrill' ),
'description' => __( 'Job Description', 'sumogrill' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'revisions', 'custom-fields' ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-format-aside',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
'show_in_rest' => true,
);
register_post_type( 'sumo_job', $args );
}
add_action( 'init', 'sumo_jobs', 0 );
}