I have a custom post type called designs.
designs is registered like this:
register_post_type(
'Designs',
theme_build_post_args(
// $slug, $singular, $plural
'designs',
'Design',
'Designs',
array(
'menu_icon' => 'dashicons-admin-appearance',
'menu_position' => 20,
'has_archive' => false,
'public' => false,
'supports' => array('title'),
)
)
);
For this post type, I don't want the following URLs to be accessible:
/designs/designs/post_name
I'm just using this post type to extract data for a block, it's not a standard level one and level two layout.
From what I've seen online, 'has_archive'=> false is what I need to achieve the above, however, it doesn't work for me? In the backend, the option to "view" a design post exists, which shouldn't be there as it shouldn't be generating a page for it?