How do I treat a cough on a 7 month old baby?

Supportive. Humidifier in the room, nose bulb suctioning, saline drops to the nose, fluids (breast milk if breast feeding + water). If other symptoms are present, may need to see a doc.
Cough. Supportive care such as humidified air, warm fluids, avoiding cold dry air could help with your baby's cough.However if the cough is persistent, accompanied by fever, respiratory difficulty, or appears to be worsening, please see your doctor asap.