Get current user data
If you just want to write a single <option> for the current user, you can get the user object from wp_get_current_user() – you don’t need a WP_User_Query at all: function getСurrentUserForFilter() { if ( is_user_logged_in() ) { $user = wp_get_current_user(); echo ‘<option value=”‘.$user->ID.'”>’.esc_html($user->user_email).'</option>’; } }