How to modify author base slug with groups and slug to use nice_nickname?

Edit: previous answer not working. Following solution does not provide sanitized nicknames, but should do the trick:

    $nn = urldecode($query_vars['author_name'] );
    $author_id = $wpdb->get_var( $wpdb->prepare( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key='nickname' AND meta_value = %s", $nn ) );

Leave a Comment