Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tabarani:13219Aḥmad b. ʿAbd al-Wahhāb b. Najdah al-Ḥawṭī > Yaḥyá b. Ṣāliḥ al-Wuḥāẓī > ʿAlī b. Ḥawshab > Abū Qabīl > Sālim from his father

[Machine] The Messenger of Allah ﷺ said, "Do not make the mosques as paths except for remembrance or prayer."  

الطبراني:١٣٢١٩حَدَّثَنَا أَحْمَدُ بْنُ عَبْدِ الْوَهَّابِ بْنِ نَجْدَةَ الْحَوْطِيُّ ثنا يَحْيَى بْنُ صَالِحٍ الْوُحَاظِيُّ ثنا عَلِيُّ بْنُ حَوْشَبٍ عَنْ أَبِي قَبِيلٍ عَنْ سَالِمٍ عَنْ أَبِيهِ قَالَ

قَالَ رَسُولُ اللهِ ﷺ «لَا تَتَّخِذُوا الْمَسَاجِدَ طُرُقًا إِلَّا لِذِكْرٍ أَوْ صَلَاةٍ»