A liquid's boiling point is defined at a standard
pressure, so also a solid's melting point is dependent on the applied pressure.
Liquid iron, under pressures at the center of the earth, is compressed to
similar density to solid iron, and our best theories say that it has
to become solid, even at those temperatures, at that pressure.
Iron's temperature-versus-spacing parameter (thermal expansivity) is
about 12 * 10^(-6) per Kelvin; its pressure-versus-volume parameter (bulk
modulus) is 170 GPa. So, 10,000 degrees heating has
an atomic-spacing expansion factor of 1.12, while a center-of-planet
pressure, 320 GPa at 5000km, gives a volume compression factor of
2, or a distance compression factor of 1.3, so it makes some
sense that the pressure and temperatures in the Earth's core
will not let iron expand from a solid to liquid: the pressure
is the winning factor here, not the temperature.
Detailed observations DO find a solid center in the planet, but
our knowledge of the exact nature of that solid is mainly
theoretical, based on heavy computation of the quantum mechanics
of atomic ensembles held apart by their electron shells and
pushed together by gravity.