We present a theoretical study that combines thermal and optomechanical effects to investigate their influences on the formation of the optical frequency comb (OFC) in whispering-gallery-mode (WGM) microcavities. The results show that the cut-off order and center frequency of OFC affected by thermal effects exhibit an overall redshift by varying the power and detuning of the pump field, which provides the possibility of tuning the offset frequency of OFC. Our study demonstrates a method to characterize the effect on the generation of OFC and the tuning of its offset frequency in a WGM resonator with opto-thermo-mechanical properties and pave the way for the future development of OFC in thermo-optomechanical environments.