Let me first try to explain your situation a little. You had some unsecured debt and likely were behind on your mortgage when you filed for Chapter 7. The lender won't modify your loan, but you still need a way to get caught up on those unpaid mortgage payments.
You are allowed to file a Chapter 13 bankruptcy after filing a Chapter 7. The only difference is you cannot receive a "discharge" of debts inside the new Chapter 13 case. Generally speaking, a discharge means your debts have been eliminated. Luckily, you don't need a discharge anymore since you eliminated your debts in the Chapter 7. You just need time to pay back the delinquent mortgage payments.
Chapter 13 allows you to catch up on delinquent mortgage payments over a three- to five-year repayment period. During that time, you'll make a payment to the trustee assigned to your case and your current mortgage payment to the lender. The trustee takes your plan payment and distributes it to the lender for the delinquent mortgage. In some bankruptcy districts, you pay the mortgage payment and delinquent payments directly to the trustee. The lender cannot sell your home as long as you are making your monthly mortgage payment as well as your monthly plan payment.
The problem now is whether you can afford your current mortgage and the Chapter 13 payment. That will be your biggest hurdle. Since you wanted a loan modification, you've been having trouble making your mortgage payment already. Now, you would have to make your normal mortgage payment as well as the Chapter 13 plan payment. That may be impossible.
There is one bright side to this approach. I see lenders more willing to work on a loan modification when a client is making monthly payments inside the Chapter 13 bankruptcy. Lenders don't like it when you are inside an active bankruptcy case. While you might be hard-pressed to make payments until a modification is approved, the lender may reconsider the loan modification to get you out of the bankruptcy.
I would suggest taking the approach of filing another case under your name only and protect your wife's credit as much as possible. Since she did not file the Chapter 7, she does not have the bankruptcy on her credit. Adding another bankruptcy to your credit will not hurt your credit much more than the Chapter 7 already did. While I don't have any concrete evidence that this increases your chance for a loan modification, I have seen this approach work for my clients. Let's hope you have the same result.