From the Post Types, there is an option to allow to have custom archive slug for CPT. I don't want to have a default archive and also the default CPT page.
I expect to show 404 page when visitor visit /{cpt-slug}/
You should uncheck the 'has_archive' option for the CPT, then no archive will be available and if someone visits the typical archive URL (the CPT slug) then it will return a 404 error.
I didn't uncheck the 'has_archive' option, I want to disable the single post also. Refer to the screenshot, I didn't assign any content template to the applicant post, when I visit hidden link , it shows the post title, I want to show the 404 page.
Hello, Nigel has replied to your initial message for not letting you wait while a supporter takes care of your request. If you don't mind, I'll continue with you on this ticket.
As long as a post has the post_status "publish" it will be viewable in the frontend, whether it has a content template or not. That's how WordPress works. The content templates are meant to customize this display. A content template will not prevent a post from being viewable or not. Only its post status does. Does it make sense?