I have found this question: 

[Wordpress outside loop sort by category and time](https://stackoverflow.com/questions/19847383/wordpress-outside-loop-sort-by-category-and-time)

But there is not a lot of context provided in the question or answer to know if it is applicable to me. I am using the popular genesis framework and a child theme. I don't want to modify any core WP files because they would be overwritten on updates. I think this can be done through my functions.php or front-page.php file.

I have 25 posts listed at a time. Within those 25 posts, I would like to have any post that is from category one be listed on top and those from category two listed afterwards. Within the category one and category two loops, the posts would be listed by time of entry as normal.

What would be the best way to do this?