I've asked a few questions trying to solve this simple problem, but nothing seems to work.
Whats the recommended way to have private/public posts? I want to have a site that if an author/editor/administrator are logged in every private post and public post are viewable/searchable. If the user is not logged in only public posts a viewable.
I have thought about/tried doing this a number of ways. A simple way I achieved this way using a WP_Query to include/excluded all posts with a custom field "Private" when logged in/out.
While this worked fine I have two problems with it, how secure is it? and It requires a custom field, when Wordpress already has private post functionality.
The other way I have tried is to use Wordpress built in Private post feature but I cant get the private post to show up on the front-end. They show up in the edit screen for allowed users and in the loop(front-end) for admins but not editors or authors....
Using wordpress built in functions is my perferrred method but just cant get it to work correctly.
any suggestions or help? Someone must have done this without the need for a custom field?
thanks