$user = wp_get_current_user(); if (in_array( 'some_group', (array) $user->roles )) { echo "user is in group" }