Stores CPT
if ( ! function_exists('chipweb_stores') ) {
// Register Custom Post Type
function chipweb_stores() {
$labels = array(
'name' => _x( 'Stores', 'Post Type General Name', 'chipweb-stores' ),
'singular_name' => _x( 'Store', 'Post Type Singular Name', 'chipweb-stores' ),
'menu_name' => __( 'Stores', 'chipweb-stores' ),
'name_admin_bar' => __( 'Store', 'chipweb-stores' ),
'archives' => __( 'Store Archives', 'chipweb-stores' ),
'attributes' => __( 'Store Attributes', 'chipweb-stores' ),
'parent_item_colon' => __( 'Store Partent:', 'chipweb-stores' ),
'all_items' => __( 'All Stores', 'chipweb-stores' ),
'add_new_item' => __( 'Add New Store', 'chipweb-stores' ),
'add_new' => __( 'Add New', 'chipweb-stores' ),
'new_item' => __( 'New Store', 'chipweb-stores' ),
'edit_item' => __( 'Edit Store', 'chipweb-stores' ),
'update_item' => __( 'Update Store', 'chipweb-stores' ),
'view_item' => __( 'View Store', 'chipweb-stores' ),
'view_items' => __( 'View Store', 'chipweb-stores' ),
'search_items' => __( 'Search Store', 'chipweb-stores' ),
'not_found' => __( 'Not found', 'chipweb-stores' ),
'not_found_in_trash' => __( 'Not found in Trash', 'chipweb-stores' ),
'featured_image' => __( 'Featured Image', 'chipweb-stores' ),
'set_featured_image' => __( 'Set featured image', 'chipweb-stores' ),
'remove_featured_image' => __( 'Remove featured image', 'chipweb-stores' ),
'use_featured_image' => __( 'Use as featured image', 'chipweb-stores' ),
'insert_into_item' => __( 'Insert into Store', 'chipweb-stores' ),
'uploaded_to_this_item' => __( 'Uploaded to this Store', 'chipweb-stores' ),
'items_list' => __( 'Store list', 'chipweb-stores' ),
'items_list_navigation' => __( 'Stores list navigation', 'chipweb-stores' ),
'filter_items_list' => __( 'Filter Stores list', 'chipweb-stores' ),
);
$args = array(
'label' => __( 'Store', 'chipweb-stores' ),
'description' => __( 'Stores CPT', 'chipweb-stores' ),
'labels' => $labels,
'supports' => array( ),
'taxonomies' => array( 'store_type' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 25,
'menu_icon' => 'dashicons-store',
'show_in_admin_bar' => false,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'store', $args );
}
add_action( 'init', 'chipweb_stores', 0 );
}