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