It sounds like temperature correction has helped in your case. But I do get asked this same question quite a bit every winter. So I will mention a few things that might help others, and I can point everyone who asks towards this thread.
It is not all that unusual for keepers to find that their corns and kings (and other colubrids) either go off feed, or show less interest in food during the fall and winter months. Usually they are adults, but occasionally juveniles will also go off feed for a while, too.
There are a couple of things to consider before undertaking the temp and light manipulation suggested below. One is that there is a medical problem - always a concern when a snake is off feed, since lack of appetite is usually the first symptom of illness. You should always check for health problems first thing when a snake goes off feed. Check carefully with eyes and fingers for lumps, bumps, injuries, muscle tone and strength, good mouth closure, clear eyes, respiratory discharge, and listen for breathing abnormalities. If anything concerns you or you are not sure, you will have to schedule a trip to a qualified herp vet.
Sometimes it can be due to different temps. Most of the time, people keep their houses a little cooler in the winter than summer. If their heat pads / strips are not on a thermostat, then the hot spot will also be cooler, too. Of course, if the cage is located near a heater, then it can be hotter than usual. Either can be a problem.
I have also found that both the reduced intensity and reduced hours of sunlight coming through windows can also affect appetite. It changes hormones, which change interest in food (I have read that it might have affected humans in similar ways - until wide use of artificial light - too bad!!). But I have found that when keepers use a bright light over the cage (making sure the cage doesn't get TOO hot), and extending "daylight" hours a couple of hours after dark, snakes MAY be fooled into thinking that spring has arrived, and it may really spike interest in food.
If you are quite sure your snake is healthy, but temp and light manipulation won't work, then you can always consider brumation for a couple of months. Make sure the stomach is completely empty, then lower temps to the 50sF, and keep mostly in the dark. They lose very little weight during the down time, and usually wake up hungry.