It could be plantars fasciitis. It is inflammed tendon in the foot and you can buy shoes that are specifically designed for plantars (very rigid sole of the shoe). Then start very slowly trying to stretch the calf and heel. It will take a long time but it finally worked for me. Do your heels feel like the are burning when you lay down on your back at night or when you get up in the morning it is worse? I don't know if it has to do with the knees catching. My knees crack but it isn't related. I would try to get a good diagnosis first then start the stretches. You can easily pull the achilles tendon so just a very gentle stretch with slight pressure when you do the calf stretch and if you step up on a step step back with one foot (while wearing walking shoes) and have the heel slightly off and don't put pressure downwards just let the heel hang over the edge for about 5 seconds and repeat 5 times etc. You can also buy an device to sleep in that stretches out the tendon in the foot but I couldn't wear it and I got over it in about 5 months. I hope this helps.
I had extremely painful feet for many years and was finally diagnosed with lyme disease through a lyme specialist. My testing came back positive. I was also tested for bartonella. My doc says that I had a secondary infection to the lyme and it caused the very painful feet. I was put on antibiotics to get rid of the bartonella for about 4 months and the pain has gone away. You can have bartonella with out having lyme disease. The only way to get proper treatment is to find a lyme specialist that understands this infection. Lymenet.org is the way to find a doc.
It is possible that your knees are causing the problem with your feet
I suggest seeing an orthopedist.