Redirect a Custom Post Type’s Single and Archive Pages in WordPress

You may find that you need to hide or redirect a custom post types single or archive pages or even both in WordPress. This may be the case if you are outputting a custom loop of CPTs and don’t want…