∇ * B = 0 and ∇ X B = Mu * J. This is proved to hold not only for infinite wires but for magnetostatics in general.
Magnetostatics = steady current
Closed wire loop with constant current is certainly a magnetostatics example.
Magnetic field on z axis above loop around origin is: B = (Mu* I * R^2)/(2 * (R^2 + z^2)^(3/2)) in z hat direction
Partial derivative with respect to z gives a non zero answer. Divergence is not zero. I am missing something obvious but fail to see what.