Will the center of the earth ever cool?

This is true of Earth’s magnetic field. But there’s no reason that a planet with a solid core couldn’t have a magnetic field due to a permanent magnetization of the core as the planet cools. I mean, first there’s a hot planet with a mag field generated by liquid motion in the mantle. Then, as the planet cools, the solid part gets larger and the material added is magnetized by the existing magnetic field. When the planet is completely solid, it has a leftover magnetization just like an iron bar magnet does.

IANA geophysicist, but this seems reasonable.

FriendRob, that’s what’s called a relic magnetic field. They do exist, but magnetization will tend to die away with time, so relic magnetic fields with nothing to re-build them tend to be very weak compared to dynamo fields.