The propagation and localization of slow magnetosonic waves (SMW) in a radially nonuniform plasma column in the presence of an axial magnetic field are investigated. A magnetohydrodynamic (MHD) model that is appropriate for the conditions in the hot solar coronal loops is employed. It is shown that temperature nonuniformities give rise to channeling of the SMW along magnetic field lines. The eigenvalue equation for the localized SMW is derived and dependencies of the axial wave numbers and of the radii of localization on the wave frequency are presented for typical solar corona conditions. It is shown that the maximal radius of localization of the SMW is smaller than the observed radii of the loops. The effects of finite ion gyrofrequency are investigated by introducing the Hall dispersion term into the ideal MHD model. It is shown that the singular behavior of the ideal MHD continuous spectrum due to the slow magnetosonic resonance is not reproduced in the limit of small wave frequency to gyrofrequency ratio. This results in an increase of the maximal radius of localization.