Easy CPT Code
Wed Feb 14 2024 21:40:09 GMT+0000 (Coordinated Universal Time)
Saved by
@naveedrashid
function custom_cpt_testimonial() {
$labels = array(
'name' => _x('Testimonials', 'Post Type General Name'),
'singular_name' => _x('Testimonial', 'Post Type Singular Name'),
'menu_name' => 'Testimonials'
);
$args = array(
'labels' => $labels,
'public' => true,
'menu_position' => 5,
'supports' => array('title', 'editor', 'thumbnail', 'excerpt'),
'has_archive' => true,
'menu_icon' => 'dashicons-admin-appearance',
'rewrite' => array('slug' => 'testimonial'),
);
register_post_type('testimonial', $args);
}
add_action('init', 'custom_cpt_testimonial');
content_copyCOPY
Comments