Is there a way to prevent people from visiting a post's permalink?
A lot of times we create posts or custom post types that end up being included as part of the content of a page or some other feature and are not always intended to be viewed individually.
A good example might be for a slideshow. You create a few posts where each individual post is the content of a slide in the slideshow. Each one of those posts has a unique permalink, something like
example.com/slide-one. There's no reason for someone to be able to access that individual post so I would like to "hide" it.