How do I stop foot odor?

I have the fungus that grows on your toe nails, it looks like tree bark. I want it gone but more importantly why do my feet stink so bad? I drink lots and lots of water. I shower at least once if not twice a day. I play hockey with bare feet in my skates but I wash good right after I don’t know why that would cause it. I have tried shoe powders, foot powders, soaking my feet in vinegar, etc. Please help.