Instructors
adds instructor
if ( ! function_exists('instructor') ) { // Register Custom Post Type function instructor() { $labels = array( 'name' => _x( 'Instructors', 'Post Type General Name', 'bhhscal-instructors' ), 'singular_name' => _x( 'Instructor', 'Post Type Singular Name', 'bhhscal-instructors' ), 'menu_name' => __( 'Instructors', 'bhhscal-instructors' ), 'name_admin_bar' => __( 'Instructor', 'bhhscal-instructors' ), 'archives' => __( 'Instructors Archives', 'bhhscal-instructors' ), 'attributes' => __( 'Instructors Attributes', 'bhhscal-instructors' ), 'parent_item_colon' => __( 'Parent Instructor:', 'bhhscal-instructors' ), 'all_items' => __( 'All Instructors', 'bhhscal-instructors' ), 'add_new_item' => __( 'Add New Instructor', 'bhhscal-instructors' ), 'add_new' => __( 'New Instructor', 'bhhscal-instructors' ), 'new_item' => __( 'New Instructor', 'bhhscal-instructors' ), 'edit_item' => __( 'Edit Instructor', 'bhhscal-instructors' ), 'update_item' => __( 'Update Instructor', 'bhhscal-instructors' ), 'view_item' => __( 'View Instructor', 'bhhscal-instructors' ), 'view_items' => __( 'View Instructors', 'bhhscal-instructors' ), 'search_items' => __( 'Search Instructors', 'bhhscal-instructors' ), 'not_found' => __( 'No Instructor found', 'bhhscal-instructors' ), 'not_found_in_trash' => __( 'No Instructor found in Trash', 'bhhscal-instructors' ), 'featured_image' => __( 'Featured Image', 'bhhscal-instructors' ), 'set_featured_image' => __( 'Set featured image', 'bhhscal-instructors' ), 'remove_featured_image' => __( 'Remove featured image', 'bhhscal-instructors' ), 'use_featured_image' => __( 'Use as featured image', 'bhhscal-instructors' ), 'insert_into_item' => __( '', 'bhhscal-instructors' ), 'uploaded_to_this_item' => __( '', 'bhhscal-instructors' ), 'items_list' => __( 'Instructors list', 'bhhscal-instructors' ), 'items_list_navigation' => __( 'Instructors list navigation', 'bhhscal-instructors' ), 'filter_items_list' => __( 'Filter Instructors list', 'bhhscal-instructors' ), ); $rewrite = array( 'slug' => 'instructor', 'with_front' => true, 'pages' => true, 'feeds' => false, ); $args = array( 'label' => __( 'Instructor', 'bhhscal-instructors' ), 'description' => __( 'Add instructors for training site', 'bhhscal-instructors' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-admin-users', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => '', 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'bhhscal_Instructors', $args ); } add_action( 'init', 'instructor', 0 ); }