The ruling of wearing a hat
Brother, I would like to know whether wearing a hat is a sunnah. Also whether to join foot to the person next to me in salaah is also sunnah
Wearing a hat is from among the matters related to customs. Some scholars maintain that covering the head during prayer is a Sunnah; this matter is unrestricted.
Joining the feet is not a condition for prayer but a requirement for those who stand in congregation for the purpose of straightening the rows and closing the gaps.