After conducting further research, you may be in luck even if the sheriff's sale was held prior to the time you filed your bankruptcy.
There is some caselaw saying that under Wisconsin law, a borrower may generally redeem the property until a foreclosure sale is confirmed.
See, for instance, In re Schultz, 363 BR 902 - Bankr. Court, ED Wisconsin 2007, here:
You should discuss the matter with a local attorney (or your bankruptcy attorney, if you have one) as soon as possible, as the lender will likely file a Motion for Relief from the Automatic Stay in order to complete the sale despite your bankruptcy filing.
In order to save your home, the short answer is that you will need to pay your mortgage and arrears through your Chapter 13 Plan. The more complicated issues involve the amount of the arrears and monthly mortgage payment, and whether the mortgage modification you signed is enforceable against the lender. These aren't questions I can answer for you in this forum - you will need a local attorney to help you with this.