Display posts separated by Category in Author’s page

If you’re using an author template there’s absolutely no need to setup(set) the author query parameters, they’ll be setup ready in the query object present on the author page..

You could additionally avoid the need to create numerous queries(one per category currently), by iterating over the query you have, extracting the categories, and storing post IDs associated with given categories inside an array. First iteration you use to build the array of IDs divided by category name/ID(whatever you like), then rewind the query, iterate over the posts, continuing(skipping) results that don’t match the first category in your newly built array of category IDs(or names). Again you follow by rewinding the loop, then iterating over it again for each category you have in the new array, continuing(skipping) posts when they don’t match the current category iteration.

It’s not something that will really make much sense until you see it, and gets a little more complex if you categorize your posts into multiple categories(where the categories can intersect across posts), but it will work(without any additional queries) for the current page(it obviously won’t sort the full result set, so whilst a given page will sort, that overall sort won’t carry across the sum of all pages for the result set).

If you think the above method sounds useful and you’re not fussed about the aforementioned problem i don’t mind providing an example.