How to See Which WordPress Template File is In Use with Show Current Template
In this text and video Quick Guide, we teach you how to show the WordPress template file being used on a given webpage on your site, using the Show Current Template or Which Template plugins.
Why Show Current Template is Useful
WordPress uses its template hierarchy to dictate which PHP template files will control the display of which webpages. Understanding how the template hierarchy works is the first step, but even with that understanding in place, it can still be difficult to know which template file in your theme is actually being used on specific page.
Fortunately, there are two great plugins that can help answer this question. The video below covers the use of Which Template, and a very similar alternative that works great is Show Current Template.
To the video:
And here’s a text explanation describing how to see which template file WordPress is using:
How to Easily Determine Which Template File WordPress Has Loaded
- Log in to your WordPress site.
- Install the Which Template plugin, or the Show Current Template plugin. (Both work great, and they’re very similar.)
- While staying logged in, visit the page you’re wondering about on your WordPress site.
- In the admin bar (to the right of most other stuff, generally) the plugin will have provided the name of the template being used, and if you hover it will give you even more details of the template(s) beyond the main member of the template hierarchy which was loaded.
That’s all there is to it—you’ll be pointed to the template file in either your child or parent theme that controls the webpage you’re looking at.
The WordPress Template Hierarchy in More Depth
Here’s more about the WordPress template hierarchy:
- Core Concepts of WordPress Themes: The Template Hierarchy: the summary you need of the topic if this isn’t familiar to you
- Child Themes, the Template Hierarchy, and One Great Little Hack: a summary of one problem that sometimes occurs with the template hierarchy and child themes, and how we can route around it
- Spelunking into the Template Hierarchy: a look for nerds at how the template hierarchy is actually implemented inside of WordPress’s core code
And if you want to understand not only the WordPress template hierarchy but all WordPress development core concepts in depth, our course Up and Running is the best guide to WordPress development available:
Serious About Learning WordPress Development?
Up and Running is our complete “learn WordPress development” course. Now in its updated and expanded Third Edition, it’s helped hundreds of happy buyers learn WordPress development the fast, smart, and thorough way.
“I think anyone interested in learning WordPress development NEEDS this course.
Before I purchased Up and Running, I had taught myself some WordPress code, but lacked direction. Watching the course’s videos was like a bunch of lights being turned on.
I went from being vaguely familiar with how themes, functions and WordPress itself worked to mastering these. Everything became much clearer.
I very happily recommend this course to anyone willing to listen.”
–Jason Robie, WordPress developer
Take the next step in your WordPress development journey!