No judge of any court shall sit in any case or proceeding in which he is interested or related to any party within the fourth degree of consanguinity or affinity or in which he has been of counsel or in which is called in question the validity of any judgment or judicial proceeding in which he was of counsel or the validity or construction of any instrument or paper prepared or signed by him as counsel or attorney, without the consent of the parties entered of record or put in writing if the court is not of record.
Ala. Code § 12-1-12 (1975)