BT Lot Post Type
if ( ! function_exists('bt_lot') ) {
// Register Custom Post Type
function bt_lot() {
$labels = array(
'name' => _x( 'Lots', 'Post Type General Name', 'bellaterra' ),
'singular_name' => _x( 'Lot', 'Post Type Singular Name', 'bellaterra' ),
'menu_name' => __( 'Lots', 'bellaterra' ),
'parent_item_colon' => __( 'Parent Lot:', 'bellaterra' ),
'all_items' => __( 'All Lots', 'bellaterra' ),
'view_item' => __( 'View Lot', 'bellaterra' ),
'add_new_item' => __( 'Add New Lot', 'bellaterra' ),
'add_new' => __( 'Add New', 'bellaterra' ),
'edit_item' => __( 'Edit Lot', 'bellaterra' ),
'update_item' => __( 'Update Lot', 'bellaterra' ),
'search_items' => __( 'Search Lot', 'bellaterra' ),
'not_found' => __( 'Not found', 'bellaterra' ),
'not_found_in_trash' => __( 'Not found in Trash', 'bellaterra' ),
);
$rewrite = array(
'slug' => 'lot',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'bt_lot', 'bellaterra' ),
'description' => __( 'Bella Terra lot information', 'bellaterra' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),
'taxonomies' => array( 'bt_lot_type' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => ' dashicons-palmtree',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'query_var' => 'lot',
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'bt_lot', $args );
}
// Hook into the 'init' action
add_action( 'init', 'bt_lot', 0 );
}