Geo Tables cpt
// Register Custom Post Type
function register_geo_table_cpt() {
$labels = array(
'name' => _x( 'Geo Tables', 'Post Type General Name', 'geo-tables' ),
'singular_name' => _x( 'Geo Table', 'Post Type Singular Name', 'geo-tables' ),
'menu_name' => __( 'Geo Tables', 'geo-tables' ),
'name_admin_bar' => __( 'Geo Tables', 'geo-tables' ),
'archives' => __( 'Table Archives', 'geo-tables' ),
'parent_item_colon' => __( 'Parent Table:', 'geo-tables' ),
'all_items' => __( 'All Tables', 'geo-tables' ),
'add_new_item' => __( 'Add New Table', 'geo-tables' ),
'add_new' => __( 'Add New Table', 'geo-tables' ),
'new_item' => __( 'New Table', 'geo-tables' ),
'edit_item' => __( 'Edit Table', 'geo-tables' ),
'update_item' => __( 'Update Table', 'geo-tables' ),
'view_item' => __( 'View Table', 'geo-tables' ),
'search_items' => __( 'Search Tables', 'geo-tables' ),
'not_found' => __( 'Not found', 'geo-tables' ),
'not_found_in_trash' => __( 'Not found in Trash', 'geo-tables' ),
'featured_image' => __( 'Featured Image', 'geo-tables' ),
'set_featured_image' => __( 'Set featured image', 'geo-tables' ),
'remove_featured_image' => __( 'Remove featured image', 'geo-tables' ),
'use_featured_image' => __( 'Use as featured image', 'geo-tables' ),
'insert_into_item' => __( 'Insert into Table', 'geo-tables' ),
'uploaded_to_this_item' => __( 'Uploaded to this Table', 'geo-tables' ),
'items_list' => __( 'Items list', 'geo-tables' ),
'items_list_navigation' => __( 'Items list navigation', 'geo-tables' ),
'filter_items_list' => __( 'Filter items list', 'geo-tables' ),
);
$args = array(
'label' => __( 'Geo Table', 'geo-tables' ),
'description' => __( 'Tables shown on specific location', 'geo-tables' ),
'labels' => $labels,
'supports' => array( 'title', 'custom-fields', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-editor-table',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'geo_table', $args );
}
add_action( 'init', 'register_geo_table_cpt', 0 );