Hi, everyone! Longtime reader, novice poster.
In addition to taking decongestants (as recommended by my doctor) when I fly, it also helps me a lot to use Earplanes, a special kind of earplugs sold in drugstores and travel stores. No, I don't own stock in the company, but I do recommend trying them if decongestants alone don't work.
Having had horrible ear pain one time when I had 3 landings in one day without having taken any precautions, I now use decongestants on a one-landing day and decongestants-plus-Earplanes on a two-landing day. Works for me!
Note: I haven't flown with a bad cold and would be scared to try.