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:
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.
This article was written by David Hayes and originally published on WPShout.