Two magnetic planets in space will attract each other, therefore their magnetic force direction/magnetic field direction must not be the same.
All planets in a solar system should have the same magnetic field direction other than their sun, otherwise they will attract each other with gravity plus magnetic force attraction, therefore magnetic planets cannot stay in orbit.
A planet's magnetic force/field strength is proportional to its ferromagnetic material mass and the sun's magnetic force, inversely proportional to the cube of the distance to the sun.
All suns should have magnetic force/field, due to every sun is spinning along its axle.
The sun is a magnet, the earth is a campass.
Earth's ferromaterial induced by the sun's magnetic force, that is the cause of earth magnetic field.