My 2006 Subaru Forester is overheating with no heat blowing through the vents. I have had a thermostat put in and a new heater core. Radiator has been pressure tested with no leaks. Unfortunately it doesn't overheat all the time. It will go a few weeks and then overheat and no heat blowing. Could be a bad thermostat. Can a head gasket be the cause but would a head gasket affect the heat?
Check the overflow tank on the radiator when the car is overheated. If that tank is full, you've probably got a blown headgasket - that's how I spotted mine.
For the thermostat; did you buy an OEM one, or after market? Foresters are very particular about the thermostat, and ONLY the OEM ones work reliably.
OK - I see from your comment above that the overflow tank is still full. In most cases, if you have a blown head gasket, you'll be losing coolant.
In can go into the main crankcase, in which case your engine oil will show the effects of coolant and oil mixing. The oil dipstick will have a mottled, milky appearance.
In can also go into the exhaust system - check the tailpipe for excessive steam and or coolant dripping. Also pop the actual radiator cap (while engine still cold, very dangerous if engine is hot) and rev the engine and see if exhaust fumes are coming out the top.
The no heat is a sign that hot coolant isn't flowing into the heater core, this could be the thermostat is stuck closed and not allowing the coolant to circulate through the engine. It could also be the water pump.
Hopefully it's not the head gasket, that's usually a sign your cylinder head is warped, and it's fairly expensive.
I had a similar issue with one of my cars. The water pump was bad. The impeller was plastic and had cracked, so it wasn't spinning (at least not as much as it should be). Since the water pump is not moving enough coolant, you are not getting enough coolant passing though your heater core to heat the car. While you are sitting, the coolant is not moving and heating up, when you start moving again, it starts moving the coolant a little and moves the hot coolant reaches the sensor.
No heat in the cabin and an overheating engine after servicing something in the cooling system... My bet is air trapped in the cooling system as it would account for both of the symptoms and matches the timeline of when the issue started.
Trapped air would also explain the overheating without coolant loss.
If needed I could elaborate on what to do to get the air out, but there's already a plethora of information on this.