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

  1. Log in to your WordPress site.
  2. Install the Which Template plugin, or the Show Current Template plugin. (Both work great, and they’re very similar.)
  3. While staying logged in, visit the page you’re wondering about on your WordPress site.
  4. 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?

Get Up and Running Today

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!


3 Responses

Comments

  • Mark says:

    Shameless plug alert: my “Simple Debug Info Panel” plugin also includes this functionality, plus a little bit more (post/page ID, page type, current window size, etc.) It’s in the WP.org repo.

  • Mark Viergutz says:

    Aren’t you concerned that the Which Template plugin hasn’t been updated in four years? The Show Current Template plugin was last updated two months ago by contrast.

  • msa4 says:

    The official registered plugin “Confirm theme structure” will show you your database and WordPress information in addition to the template information!

Add a Comment

Your email address will not be published. Required fields are marked *