After foreclosure do I have to pay condo fee?

The answer depends on the details of the situation. It may depend on whether a lien was recorded in the land records. Some states provide condominium liens with special status and they must be paid off first using the proceeds of the sale. The details must be reviewed by a legal professional who is familiar with the laws in your jurisdiction. That type of status would be reported in a title examination performed on behalf of the prospective buyer.
Assessments - you call them fees -- pay for the operation of the condominium community. Whoever enjoys the ownership privileges of the community is liable for the monthly assessments.

If you are the owner upon whom the foreclosure is executed, you still owe your unpaid assessments up to that date.

If you no longer own the unit and there are unpaid assessments that you owe, these are valid debts you are obliged to pay. Read your governing documents to verify that assessments are an automatic lien in your title, and that you may also be liable personally to pay the debt.

When you purchase a condominium that has been in foreclosure, you are required to pay the ongoing assessments, and may have a responsibility to pay the assessments in arrears, depending on how the foreclosure agreement was structured.