I have a custom post type acme_reviews
. I've namespaced it as suggested in tutorials to prevent future conflicts. But I want its archive page to simply be acme.com/reviews
, not acme.com/acme_reviews
. How do I achieve this? This is my code:
function create_reviews_post_type() {
register_post_type('acme_reviews', array(
'labels' => array(
'name' => __('Reviews'),
'singular_name' => __('Review')
),
'menu_position' => 5,
'public' => true,
'has_archive' => true,
)
);
}
add_action('init', 'create_reviews_post_type');