Members Meta Query
A meta query to accompany the Members plugin by Justin Tadlock, and will not effect the query without it installed and active.
This meta query will exclude any posts from your custom WP_Query loop that have roles checked in the “Content Permissions” meta box that do not match the ‘_members_access_role’ value.
The ‘_members_access_role’ value can be any string or array (if using a variable, remove the surrounding quotes).
In my template I got the current user roles array like this (PHP):
global $current_user;
$current_user_roles = array_keys($current_user->caps);
$user_role_query = array( 'relation' => 'OR', array( 'key' => '_members_access_role', 'value' => 'Current_User_Roles', 'compare' => 'IN', ), array( 'key' => '_members_access_role', 'compare' => 'NOT EXISTS', ), );