Tell us what you are trying to do?
Hello, I'm working on the prototype of a site in which there will be some free access posts and private access posts.
These posts will be made from a specific custom post type.
Here is my question:
I wonder if I can make a unique archive page which could mix either free access posts and private posts.
In other words, when a user is not connected he would see only the free access posts and when a user is connected he would see the free access AND the private access posts in the same blog page.
How do you distinguish between free and private posts?
You can add a conditional block to wrap the output of your archive loop items so that they are only shown to logged-in users with a test of the current user id (see screenshot).
But that would hide *all* posts from guest users. You would need to combine it with some other condition relating to whether the posts were free or private, but the specifics depend on how you implement that.