Is there a variable for a template parts name?
There isn’t a core global variable that returns the current context. However, you can construct your own, using contextual template conditional tags. You can step through the conditional tags in the same order as WordPress core, by following wp-includes/template-loader.php. Simply wrap your output in a custom Theme function. Here’s how I do it (note: I … Read more