Products and Services
Products and Services
// Register Custom Post Type
function products_and_services() {
$labels = array(
'name' => _x( 'Products and Services', 'Post Type General Name', 'wordpress' ),
'singular_name' => _x( 'Product/Service', 'Post Type Singular Name', 'wordpress' ),
'menu_name' => __( 'Products and Services', 'wordpress' ),
'name_admin_bar' => __( 'Products and Services', 'wordpress' ),
'archives' => __( 'Products and Services Archives', 'wordpress' ),
'attributes' => __( 'Product/Service Attributes', 'wordpress' ),
'parent_item_colon' => __( 'Parent Item:', 'wordpress' ),
'all_items' => __( 'All Products and Services', 'wordpress' ),
'add_new_item' => __( 'Add New Product/Service', 'wordpress' ),
'add_new' => __( 'Add New Product/Service', 'wordpress' ),
'new_item' => __( 'New Product/Service', 'wordpress' ),
'edit_item' => __( 'Edit Product/Service', 'wordpress' ),
'update_item' => __( 'Update Product/Service', 'wordpress' ),
'view_item' => __( 'View Product/Service', 'wordpress' ),
'view_items' => __( 'View Products and Services', 'wordpress' ),
'search_items' => __( 'Search Products and Services', 'wordpress' ),
'not_found' => __( 'Not found', 'wordpress' ),
'not_found_in_trash' => __( 'Not found in Trash', 'wordpress' ),
'featured_image' => __( 'Featured Image', 'wordpress' ),
'set_featured_image' => __( 'Set featured image', 'wordpress' ),
'remove_featured_image' => __( 'Remove featured image', 'wordpress' ),
'use_featured_image' => __( 'Use as featured image', 'wordpress' ),
'insert_into_item' => __( 'Insert into Product/Service', 'wordpress' ),
'uploaded_to_this_item' => __( 'Uploaded to this Product/Service', 'wordpress' ),
'items_list' => __( 'Products and Services list', 'wordpress' ),
'items_list_navigation' => __( 'Products and Services list navigation', 'wordpress' ),
'filter_items_list' => __( 'Filter Products and Services List', 'wordpress' ),
);
$args = array(
'label' => __( 'Product/Service', 'wordpress' ),
'description' => __( 'Products and Services', 'wordpress' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-admin-multisite',
'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( 'producs_services', $args );
}
add_action( 'init', 'products_and_services', 0 );