From Dev.to
Get the Current Theme Template Filename in WordPress
Lately I find myself re-using these handy bits of code in many of my WordPress themes. They will help you identify the name of the current template file being used in the front-end or admin. If you’re...
