So this is what I'm trying to do. I have some posts that are visible only to users with a certain role. I want to display them in a user's profile section, so they're immediately visible after they log-in. Let me underline it: I don't want to display ALL the posts that my user is allowed to see, but only those that are restricted to my user's role.
What I found and tried didn't solve my issue.
$q = new WP_Query(array( 'perm' => 'readable' )); while ($q->have_posts()) : $q->the_post(); the_title(); endwhile;
Of course this does query all the accessible posts, which is not what I want. So, can I avoid creating a restricted category to solve this?