In his later years Xuanzong doted on Yang Guifei and lost interest in affairs of state.
Tips
usage
玄宗 is a temple name, the title an emperor received after death in the ancestral temple. In full it is 唐玄宗; on its own, in talk of the Tang, it always means him.
history
In Qing dynasty books he often appears as 唐元宗: 玄 was part of the personal name of the Kangxi emperor, 玄烨, and writers replaced it to avoid using it.