Products
// Register Custom Post Type
function products() {
$labels = array(
'name' => _x( 'Products', 'Post Type General Name', 'tallegg' ),
'singular_name' => _x( 'Product', 'Post Type Singular Name', 'tallegg' ),
'menu_name' => __( 'Products', 'tallegg' ),
'name_admin_bar' => __( 'Product', 'tallegg' ),
'archives' => __( 'Product Archives', 'tallegg' ),
'parent_item_colon' => __( 'Parent Item:', 'tallegg' ),
'all_items' => __( 'All Products', 'tallegg' ),
'add_new_item' => __( 'Add New Product', 'tallegg' ),
'add_new' => __( 'Add New', 'tallegg' ),
'new_item' => __( 'New product', 'tallegg' ),
'edit_item' => __( 'Edit product', 'tallegg' ),
'update_item' => __( 'Update product', 'tallegg' ),
'view_item' => __( 'View product', 'tallegg' ),
'search_items' => __( 'Search product', 'tallegg' ),
'not_found' => __( 'Not found', 'tallegg' ),
'not_found_in_trash' => __( 'Not found in Trash', 'tallegg' ),
'featured_image' => __( 'Featured Image', 'tallegg' ),
'set_featured_image' => __( 'Set featured image', 'tallegg' ),
'remove_featured_image' => __( 'Remove featured image', 'tallegg' ),
'use_featured_image' => __( 'Use as featured image', 'tallegg' ),
'insert_into_item' => __( 'Insert into product', 'tallegg' ),
'uploaded_to_this_item' => __( 'Uploaded to this product', 'tallegg' ),
'items_list' => __( 'Products list', 'tallegg' ),
'items_list_navigation' => __( 'Products list navigation', 'tallegg' ),
'filter_items_list' => __( 'Filter products list', 'tallegg' ),
);
$args = array(
'label' => __( 'Product', 'tallegg' ),
'description' => __( 'Tallegg products', 'tallegg' ),
'labels' => $labels,
'supports' => array( 'title', 'thumbnail', 'revisions', ),
'hierarchical' => true,
'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', 'products', 0 );