# REGISTER ORDER POST TYPE
function post_type_order() {
$labels = array(
'name' => _x( 'Orders', 'post type general name' ),
'singular_name' => _x( 'Order', 'post type singular name' ),
'add_new' => _x( 'Add New', 'order' ),
'add_new_item' => __( 'Add New Order' ),
'edit_item' => __( 'Edit Order' ),
'new_item' => __( 'New Order' ),
'all_items' => __( 'All Orders' ),
'view_item' => __( 'View Order' ),
'search_items' => __( 'Search Orders' ),
'not_found' => __( 'No order found' ),
'not_found_in_trash' => __( 'No orders found in the Trash' ),
'menu_name' => 'Orders'
);
$args = array(
'labels' => $labels,
'description' => 'Holds our orders and order specific data',
'public' => true,
'menu_icon' => 'dashicons-cart',
'menu_position' => 1,
'supports' => array( 'title', 'custom-fields' ),
'has_archive' => true,
);
register_post_type( 'order', $args );
}
add_action( 'init', 'post_type_order' );
# REGISTER ORDER POST TYPE
function post_type_order() {
$labels = array(
'name' => _x( 'Orders', 'post type general name' ),
'singular_name' => _x( 'Order', 'post type singular name' ),
'add_new' => _x( 'Add New', 'order' ),
'add_new_item' => __( 'Add New Order' ),
'edit_item' => __( 'Edit Order' ),
'new_item' => __( 'New Order' ),
'all_items' => __( 'All Orders' ),
'view_item' => __( 'View Order' ),
'search_items' => __( 'Search Orders' ),
'not_found' => __( 'No order found' ),
'not_found_in_trash' => __( 'No orders found in the Trash' ),
'menu_name' => 'Orders'
);
$args = array(
'labels' => $labels,
'description' => 'Holds our orders and order specific data',
'public' => true,
'menu_icon' => 'dashicons-cart',
'menu_position' => 1,
'supports' => array( 'title', 'custom-fields' ),
'has_archive' => true,
);
register_post_type( 'ordersss', $args );
}
add_action( 'init', 'post_type_order' );