products OLS
// Register Custom Post Type
function product() {
$labels = array(
'name' => _x( 'Products', 'Post Type General Name', 'ols' ),
'singular_name' => _x( 'Product', 'Post Type Singular Name', 'ols' ),
'menu_name' => __( 'Products', 'ols' ),
'name_admin_bar' => __( 'Products', 'ols' ),
'archives' => __( 'Product archive', 'ols' ),
'attributes' => __( 'Product attributes', 'ols' ),
'parent_item_colon' => __( 'Parent product', 'ols' ),
'all_items' => __( 'All products', 'ols' ),
'add_new_item' => __( 'Add product', 'ols' ),
'add_new' => __( 'Add product', 'ols' ),
'new_item' => __( 'Add new product', 'ols' ),
'edit_item' => __( 'Edit product', 'ols' ),
'update_item' => __( 'Update product', 'ols' ),
'view_item' => __( 'View product', 'ols' ),
'view_items' => __( 'View products', 'ols' ),
'search_items' => __( 'Search product', 'ols' ),
'not_found' => __( 'Product not found', 'ols' ),
'not_found_in_trash' => __( 'Product not found', 'ols' ),
'featured_image' => __( 'Product image', 'ols' ),
'set_featured_image' => __( 'Set product image', 'ols' ),
'remove_featured_image' => __( 'Remove product image', 'ols' ),
'use_featured_image' => __( 'Use as product image', 'ols' ),
'insert_into_item' => __( 'Insert into product', 'ols' ),
'uploaded_to_this_item' => __( 'Uploaded to this product', 'ols' ),
'items_list' => __( 'Product list', 'ols' ),
'items_list_navigation' => __( 'Product list navigation', 'ols' ),
'filter_items_list' => __( 'filter product list', 'ols' ),
);
$args = array(
'label' => __( 'Product', 'ols' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'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',
);
register_post_type( 'product', $args );
}
add_action( 'init', 'product', 0 );