The back-reaction of the perturbed thermal equilibrium in the solar corona on compressive perturbations, also known as the effect of wave-induced thermal misbalance, is known to result in thermal instabilities chiefly responsible for the formation of fine thermal structuring of the corona. We study the role of the magnetic field and field-aligned thermal conduction in triggering instabilities of slow magnetoacoustic and entropy waves in quiescent and hot active region loops, caused by thermal misbalance. Effects of the magnetic field are accounted for by including it in the parametrization of a guessed coronal heating function, and the finite plasma parameter β, in terms of the first-order thin flux tube approximation. Thermal conduction tends to stabilize both slow and entropy modes, broadening the interval of plausible coronal heating functions allowing for the existence of a thermodynamically stable corona. This effect is most pronounced for hot loops. In contrast to entropy waves, the stability of which is found to be insensitive to the possible dependence of the coronal heating function on the magnetic field, slow waves remain stable only for certain functional forms of this dependence, opening up perspectives for its seismological diagnostics in future.