Yes, fungal infection and STDs can cause a slight
erectile dysfunction. Hence get this tested. Other than that there are many other causes of erectile dysfunction such as stress and anxiety, depression, smoking, alcohol, and illicit drugs, high blood pressure, poor circulation and peripheral vascular disease, heart or thyroid conditions, spinal cord injury, nerve damage (for example, from prostate surgery), or neurologic disorders (such as multiple sclerosis or Parkinson's disease).