(a) None of the provisions of this act other than subsection (b) of Kan. Stat. Ann. §§ 22-2521 and subsection (c) of Kan. Stat. Ann. § 22-2522 shall apply when a person is convicted of a crime and committed to a jail or other institution.

(b) The provisions of this act relating to strip searches other than subsection (b) of Kan. Stat. Ann. § 22-2521 shall not apply when a person accused of a crime is committed to a jail or other institution pursuant to a court order, nor when a person accused of a crime is, of necessity, confined with other prisoners in a jail while awaiting appearance before a magistrate.