Hello mdogan,
The “orderby=name” parameter of the [staff-directory] function, returns a result based on the “post_name” which you can find in the wordpress db under “wp-posts”, and not the name you define as the name while filling the post.
If you want to use “orderby=name” and have it order your staff members by surname instead of their given name, you’ll have to edit the post_name column in your database to the staff’s surname.
The orderby parameter is kind of sketchy and could definetly use some polishing as it only has the option of using ID (returning the post’s id from the database; displaying the staff members in the order they were created in) and name (returning the post’s name from the database; displaying the staff members in the alphabetical order of the first title given to the post).
When you’ll be adding new staff member’s you’ll have to make sure to use their surname as the post’s title to prevent the ordering being akward and having to edit the database again.
I hope this helped you