Doctors Post Type
// Register Custom Post Type
function doctors_post_type() {
$labels = array(
'name' => _x( 'Doctors', 'Post Type General Name', 'lvi' ),
'singular_name' => _x( 'Doctor', 'Post Type Singular Name', 'lvi' ),
'menu_name' => __( 'Doctors', 'lvi' ),
'name_admin_bar' => __( 'Doctor', 'lvi' ),
'archives' => __( 'Item Archives', 'lvi' ),
'attributes' => __( 'Item Attributes', 'lvi' ),
'parent_item_colon' => __( 'Parent Doctor:', 'lvi' ),
'all_items' => __( 'All Doctors', 'lvi' ),
'add_new_item' => __( 'Add New Doctor', 'lvi' ),
'add_new' => __( 'New Doctor', 'lvi' ),
'new_item' => __( 'New Item', 'lvi' ),
'edit_item' => __( 'Edit Doctor', 'lvi' ),
'update_item' => __( 'Update Doctor', 'lvi' ),
'view_item' => __( 'View Doctor', 'lvi' ),
'view_items' => __( 'View Items', 'lvi' ),
'search_items' => __( 'Search doctors', 'lvi' ),
'not_found' => __( 'No doctors found', 'lvi' ),
'not_found_in_trash' => __( 'No doctors found in Trash', 'lvi' ),
'featured_image' => __( 'Featured Image', 'lvi' ),
'set_featured_image' => __( 'Set featured image', 'lvi' ),
'remove_featured_image' => __( 'Remove featured image', 'lvi' ),
'use_featured_image' => __( 'Use as featured image', 'lvi' ),
'insert_into_item' => __( 'Insert into item', 'lvi' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'lvi' ),
'items_list' => __( 'Items list', 'lvi' ),
'items_list_navigation' => __( 'Items list navigation', 'lvi' ),
'filter_items_list' => __( 'Filter items list', 'lvi' ),
);
$args = array(
'label' => __( 'Doctor', 'lvi' ),
'description' => __( 'Doctors information pages.', 'lvi' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes', ),
'taxonomies' => array( 'category' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-businessman',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'doctor', $args );
}
add_action( 'init', 'doctors_post_type', 0 );