I have two CPTs X and Y having a many-to-many relationship through a 3rd Z CPT that is nothing but a virtual link between X and Y. Every post in Z should naturally be a link between a post of type X and a post of type Y.
Now, how can I hide these posts (or the CPT itself) from being accessed on the frontend? If I set those posts to private, the two X and Y CPTs - to my surprise - don't become accessible. Setting them to password protected still get them publicly accessible URLs, so this is not a solution neither.
Even if I decided to use the ACCESS plugin to set this CPT access level, it would still be accessible on the fronted but requiring a login or something, so this is not working too.
There must be a lot of folks here who needed to link two CPTs using something that they don't want it publicly accessible. How to hide that?
I'm not sure what the problem with using Access is.
If you manage the intermediary custom post type with Access and deny read access to guests then users who are not logged in will by default see a 404 page not found error, and if you have logged-in users who you do not want to see these posts then for their role you would also deny read access.
Thanks for your reply, Nigel. I have found out that there is a property "public available" when editing the post type; when unchecked it does the job. There is no need to use Access plugin or any additional plugins.
Regarding using Access, I assumed that non logged-in users will get 401 unauthorized instead of 404, but I was wrong. Thanks though.