As you see, orderby is a parameter in the frontend script. You should search orderby to find where the search and order by feature has logic. There you can find cases to insert new parameter.
In the codes you probable find popularity, rating, date, price, price-desc as well. There you can insert a new sorting logic.