שולחן ערוך, יורה דעה שפ״ב

Shulchan Arukh, Yoreh De'ah 382

איסור נעילת הסנדל לאבל. ובו ה' סעיפים:
(אבל) אסור בנעילת הסנדל דוקא של עור אבל באנפליא של בגד או של גמי או של שער או של עץ מותר שאין מנעל אלא של עור ואם הוא של עץ ומחופה עור אסור:
A mourner is forbidden to put on sandals [or shoes] only if [they are made] of leather, but a pair of shoes made of cloth, reeds, hair or wood, is permissible, for an [ordinary] shoe is [usually made] of leather. However, if it [was made] of wood and covered over by leather, it is forbidden.
חיה מותרת לנעול כל ל' יום מפני שהצנה קשה לה:
A woman after confinement is permitted to wear [leather-] shoes throughout the thirty days [of mourning] because the cold is harmful to her.
כל אדם מותר לנעול במקום שיש סכנת עקרב:
Every person [in mourning] is permitted to put on shoes where there is danger of [being attacked by] a scorpion.
אבל ומנודה שהיו מהלכים בדרך מותרים בנעילת הסנדל וכשיגיעו לעיר חולצין ויש מי שאומר שאם היא עיר שרובה עובדי כוכבים אין חולצין עד שיכנסו לרחוב היהודים:
A mourner or an excommunicant who were walking on the road, are permitted to put on shoes, and when they reach the city they remove [them]. There is, however, an authority who states that [in] a city, the majority of which, are Gentiles, one does not remove [his shoes] until he enters the Jewish quarters, [or a Jewish house].
אם צריך לחלוץ מנעל בבית הקברות אחר שנקבר המת נתבאר בסימן שע"ה: הגה י"א שצריך לילך יחף מבית הקברות לביתו אם מת אביו או אמו (כל בו בשם ר"י) ולא ראיתי נוהגין כן:
Whether one is required to remove [his] shoes on the cemetery after the corpse is interred, has been explained in § 37 Gloss: Some say that one is required to go barefooted from the cemetery to his home, if his father or mother died, but I have not seen this custom adopted.

Ashlei Ravrevei: Shulchan Aruch Yoreh Deah, Lemberg, 1888 (Public Domain) · Code of Hebrew Law by Chaim N. Denburg, Montreal, 1955 (CC-BY) · 5 se'ifim