_x('Products', 'post type general name'), 'singular_name' => _x('product', 'post type singular name'), 'add_new' => _x('Add New', 'product'), 'add_new_item' => __('Add New Products'), 'edit_item' => __('Edit Products'), 'new_item' => __('New product'), 'view_item' => __('View Products'), 'search_items' => __('Search Products'), 'not_found' => __('No Products found'), 'not_found_in_trash' => __('No Products found in Trash'), 'parent_item_colon' => '' ); $product_args = array( 'labels' => $product_labels, 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => true, 'supports' => array('title', 'editor', 'thumbnail'), 'taxonomies' => array( '' ), 'menu_icon' => get_bloginfo('template_directory') . '/images/products-icon.png', // Icon Path 'has_archive' => true ); register_post_type( 'product' , $product_args ); register_taxonomy( 'brands', 'product', array( 'hierarchical' => true, 'label' => __('Product Brands'), 'query_var' => 'brands' ) ); } add_action("admin_init", "admin_init"); add_action('save_post', 'save_points', 1, 2); function admin_init(){ add_meta_box("productInfo-meta", "Product Details", "product_meta_options", 'product', "normal", "low"); } function product_meta_options(){ global $post; $custom = get_post_custom($post->ID); $category = (!empty($custom["_category"][0])) ? $custom["_category"][0] : ''; $brand = (!empty($custom["_brand"][0])) ? $custom["_brand"][0] : ''; $features = (!empty($custom["_features"][0])) ? $custom["_features"][0] : ''; $holds = (!empty($custom["_holds"][0])) ? $custom["_holds"][0] : ''; $content = (!empty($custom["_custom_content"][0])) ? $custom["_custom_content"][0] : ''; ?>
Category
Brand
Features 20) ); ?>
Content 20) );?>
Holds 20) ); ?>