Custom post archive page not opening 404 page
I have custom post type like this
register_post_type( 'workforce_archive',
array(
'labels' = array(
'name' = __( 'Workforce Archives' ),
'singular_name' = __( 'Workforce Archive' )
),
'public' = true,
'has_archive' = true,
'rewrite' = array('slug' = 'workforce_archive'),
'show_in_rest' = true,
'show_in_menu' = false,
'supports' = [ 'title', 'editor', 'author' ]
)
);
And also have a file archive-workforce_archives.php but still I am getting 404 page when visit this URL http://taliestrategies.local/workforce_archives.
Any help is appreciated. Thanks
Topic archive-template custom-post-type-archives archives Wordpress
Category Web