Can you get a home loan if you have recently filed a chapter 7?

Not if the bankruptcy is pending. Once it has been discharged (preferably closed) then it is possible to apply for credit. Whether or not the applicant is extended credit of any sort is the decision of the lending institution.