Tag Info

Hot answers tagged

1

First, you should know that current_user_can() only accepts capabilities, not roles, so you are using it wrong and you can end up with unexpected results. That being said, to exlude users form WP_User_Query you can use the exclude parameter: // Get current user data $user = wp_get_current_user(); // Check if current user is a subscriber if( ! empty( $user ...



Only top voted, non community-wiki answers of a minimum length are eligible