eon – products catalog
products catalog custom post type
if ( ! function_exists('products_catalog') ) { // Register Custom Post Type function products_catalog() { $labels = array( 'name' => _x( 'products', 'Post Type General Name', 'eon-techno' ), 'singular_name' => _x( 'product', 'Post Type Singular Name', 'eon-techno' ), 'menu_name' => __( 'Products Catalog', 'eon-techno' ), 'name_admin_bar' => __( 'Products', 'eon-techno' ), 'archives' => __( 'Products Archives', 'eon-techno' ), 'attributes' => __( 'Product Attributes', 'eon-techno' ), 'parent_item_colon' => __( 'Parent Product:', 'eon-techno' ), 'all_items' => __( 'All Products', 'eon-techno' ), 'add_new_item' => __( 'Add New Product', 'eon-techno' ), 'add_new' => __( 'Add Product', 'eon-techno' ), 'new_item' => __( 'New Product', 'eon-techno' ), 'edit_item' => __( 'Edit Product', 'eon-techno' ), 'update_item' => __( 'Update Product', 'eon-techno' ), 'view_item' => __( 'View Product', 'eon-techno' ), 'view_items' => __( 'View Products', 'eon-techno' ), 'search_items' => __( 'Search Product', 'eon-techno' ), 'not_found' => __( 'Not found', 'eon-techno' ), 'not_found_in_trash' => __( 'Not found in Trash', 'eon-techno' ), 'featured_image' => __( 'Featured Image', 'eon-techno' ), 'set_featured_image' => __( 'Set featured image', 'eon-techno' ), 'remove_featured_image' => __( 'Remove featured image', 'eon-techno' ), 'use_featured_image' => __( 'Use as featured image', 'eon-techno' ), 'insert_into_item' => __( 'Insert into product', 'eon-techno' ), 'uploaded_to_this_item' => __( 'Uploaded to this product', 'eon-techno' ), 'items_list' => __( 'Products list', 'eon-techno' ), 'items_list_navigation' => __( 'Products list navigation', 'eon-techno' ), 'filter_items_list' => __( 'Filter products list', 'eon-techno' ), ); $args = array( 'label' => __( 'product', 'eon-techno' ), 'description' => __( 'products catalog', 'eon-techno' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes' ), 'taxonomies' => array( 'product_type' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 20, 'menu_icon' => 'dashicons-cart', '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_catalog', $args ); } add_action( 'init', 'products_catalog', 0 ); }