// Register Testimonials Post Type
function testimonials_post_type() {
$labels = array(
'name' => _x( 'Testimonials', 'Post Type General Name', 'youth-worker' ),
'singular_name' => _x( 'Testimonial', 'Post Type Singular Name', 'youth-worker' ),
'menu_name' => __( 'Testimonials', 'youth-worker' ),
'name_admin_bar' => __( 'Testimonials', 'youth-worker' ),
'archives' => __( 'Testimonial Archives', 'youth-worker' ),
'attributes' => __( 'Testimonial Attributes', 'youth-worker' ),
'parent_item_colon' => __( 'Parent Item:', 'youth-worker' ),
'all_items' => __( 'All Testimonials', 'youth-worker' ),
'add_new_item' => __( 'Add New Testimonial', 'youth-worker' ),
'add_new' => __( 'Add New', 'youth-worker' ),
'new_item' => __( 'New Testimonial', 'youth-worker' ),
'edit_item' => __( 'Edit Testimonial', 'youth-worker' ),
'update_item' => __( 'Update Testimonial', 'youth-worker' ),
'view_item' => __( 'View Testimonial', 'youth-worker' ),
'view_items' => __( 'View Testimonials', 'youth-worker' ),
'search_items' => __( 'Search Testimonial', 'youth-worker' ),
'not_found' => __( 'Not found', 'youth-worker' ),
'not_found_in_trash' => __( 'Not found in Trash', 'youth-worker' ),
'featured_image' => __( 'Featured Image', 'youth-worker' ),
'set_featured_image' => __( 'Set featured image', 'youth-worker' ),
'remove_featured_image' => __( 'Remove featured image', 'youth-worker' ),
'use_featured_image' => __( 'Use as featured image', 'youth-worker' ),
'insert_into_item' => __( 'Insert into item', 'youth-worker' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'youth-worker' ),
'items_list' => __( 'Testimonials list', 'youth-worker' ),
'items_list_navigation' => __( 'Testimonials list navigation', 'youth-worker' ),
'filter_items_list' => __( 'Filter Testimonials list', 'youth-worker' ),
);
$args = array(
'label' => __( 'Testimonial', 'youth-worker' ),
'description' => __( 'Post Type for testimonials', 'youth-worker' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', 'post-formats' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 30,
'menu_icon' => 'dashicons-format-status',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'testimonials', $args );
}
add_action( 'init', 'testimonials_post_type', 0 );