Can a pinched nerve cause pain on the top of the foot?
Yes, they can. Pinched nerves can cause issues in any part of the body that the nerve controls, and foot and leg pain is very common with pinched nerves in the hip and back. The best way to treat the foot pain is to treat the pinched nerve itself, and the pain can often be controlled with medication, massage, physical therapy, and other treatments. I hope you find relief for it soon!
Here are some links that might be helpful to you as you're dealing with this:
What Can Be Done for Nerve Pain?
Using Tylenol Responsibly
Why Yoga Can Help Soothe Many Types of Chronic Pain