We are beginning Klal 69, which discusses the halachos of kavod talmidei chachamim.
The Chayei Adam begins by writing that there is a mitzvah to give kavod to a talmid chacham by standing up for them. It is irrelevant whether they are old or not (he will discuss standing for the elderly in the next siman). There is a chiyuv and mitzvah to stand up due to their status as a talmid chacham. The Chayei Adam writes that even if a child less than 13 years old stands out as a knowledgeable person who is a source of wisdom and worthy to learn from–even if he is not of the gedolei hador–one should stand up for him. The Chayei Adam points out that the chiyuv to stand up for such a person is both due to the Torah he already knows and can teach, and the potential for him to continue learning and teaching.
The pasuk says mipnei seivah takum vehadarta pnei zakein. Chazal understand that zakein is not referring to someone elderly (as they are already delineated in the word seivah) but rather that zakein is a contraction of the words zeh kanah, referring to zeh shekanah chochmah, one who has acquired wisdom.
The Gemara points out that if one reads the pasuk literally, it would appear that a person only needs to stand up for an elderly person, and only needs to give hiddur (respect) to someone wise. However, the Gemara explains that the pasuk is read in a way that both actions apply to both types of people. The pasuk is read as mipnei seivah takum vehadarta, and takum vehadarta pnei zakein. Thus, the verbs apply equally to someone elderly, even if they are not a talmid chacham, and a talmid chacham, even if they are not elderly.
It is interesting to note the language of the Chayei Adam. He begins the siman by writing yishtadel lekayeim, that one should put effort into giving this kavod. This language can be interpreted in one of two ways. One, since it is a constant issue, where one may have to stand up multiple times per day for multiple people, it can be easy to become lax in it, so the Chayei Adam is encouraging a person to avoid becoming lax.
Alternatively, the Chayei Adam means that a person should seek out opportunities to fulfill this mitzvah, such as if one lives in a community where they do not have many such opportunities. The point of the kavod is not only for the individual, but primarily for the Torah which that individual represents and contains. The Gemara calls out the people of Bavel for standing up for Sifrei Torah, but not for talmidei chachamim who are an active embodiment of that which is contained in a Sefer Torah. The Gemara makes a kal vachomer, that if one stands up for a Sefer Torah, they should certainly stand up for talmidei chachamim. Thus, the Chayei Adam may be referring to the importance of seeking out such opportunities in order to give kavod to the Torah they represent.
One should put effort into giving kavod and standing up for the elderly and talmidei chachamim.