Whirlpool gas dryer

Dryer heats up for a few minutes and then starts to cool down. Will not heat up after that. I have cleaned the duct work and internal parts. I am guessing the thermostat is bad, but notice there are two on the parts list for Whirlpool. Do I replace both ? Also, on the site the part does not look the same as it does on my dryer…
Any help would be great. I’m sure I can change these myself.
Paul

if the hot surface ignitor still continues to try to ignite the gas, and the gas never comes ( which never comes out ) then, more than likely your problem is with the coils on your gas valve in the dryer …

Thanks Jim, so what do you think, call a repair tech ?

well it depends on how handy you are ? if you see the glow of the ignitor and the gas never comes on , replacing the coils on top of the gas valve is really pretty easy… if you are electrically oriented then diagnosing a thermal cut out / thermostat problem is not that bad either .. set the dryer for low temp for 60 minutes and after 20 minutes pull the toe kick / kick plate off and see if you see the ignitor ( glo-bar ) cycle on / off ?