Maulana Dawood Raz
Hadith Commentary:
It is understood from this that poetry imbued with wisdom, insight, and Islamic teachings is not blameworthy.
Source: Sahih Bukhari: Commentary by Maulana Dawood Raz, Page: 6145
Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
(1)
By "wisdom" is meant that true statement which corresponds to reality.
There is no harm in reciting those poems which are based on admonition, advice, and truth and veracity; however, one should refrain from reciting those poems which are characterized by obscenity, falsehood, and are in harmony with falsehood.
In one hadith, it is mentioned that the noble Companions (radi Allahu anhum) of the Messenger of Allah (sallallahu alayhi wa sallam) would mention matters from the pre-Islamic era and recite poetry in the presence of the Messenger of Allah (sallallahu alayhi wa sallam), but the Messenger of Allah (sallallahu alayhi wa sallam) would not prohibit them; rather, at times, he would smile and be pleased.
(Musnad Ahmad: 5/91) (2)
The commentator of Sahih al-Bukhari, Ibn Battal (rahimahullah), said that those poems which contain the remembrance of Allah, His glorification and veneration, and His oneness and obedience—these are what are referred to as "wisdom" in the hadith. As for those poems which are obscene, indecent, and false, they are blameworthy and such poems should not be recited.
(Fath al-Bari: 10/663)
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 6145