Whether to use EQ before or after (or both before and after) applying compression is a creative choice. But to make the best decision, you should understand how a compressor will affect an EQ’d signal:
When you EQ a signal, you are emphasizing and/or de-emphasizing frequencies.
When you compress a signal, you are limiting the dynamics, in effect “squashing” the signal together.
This means that if you use EQ before a compressor, you will diminish the effects of the EQ by reducing the dynamics. So if your goal is to reduce the dynamic range of a signal, and then take that more-even signal and adjust specific frequencies, compress the signal first, then add your EQ. However, if your goal is a less prominent EQ, just some tone shaping into the dynamics control, add EQ first.
In some cases, applying compression can also alter the tone of a signal — the low end may come up, the high end may be reduced, and so on. In this case, corrective EQ should be applied after the compression.
And of course you can do both — a bit of EQing into a compressor, and then take the tone-shaped compressed signal and do creative or corrective EQ afterward.
Either way, knowing how a processor will affect your signal is key to putting it right where you want it — experiment on a variety of signals with EQ > Compressor and then Compressor > EQ and see which works best for each situation.