Get the current hierarchy php page
Assuming that you’re wanting to determine which template page is currently being displayed, within the template hierarchy, the easiest way to do so is via the output of body_class(). However, if you need to return this information programmatically, the easiest way might be to call get_body_class(), and then evaluate the array of classes returned. Given … Read more