Meks
Do you know you can try any of our premium WordPress themes for free?Show me the themes
Quickly find which WordPress template file is currently being used

Quickly find which WordPress template file is currently being used

6Shares

If you ever played with WordPress theme files and tried to modify it by yourself, you probably already heard and learnt about the WordPress template hierarchy.

However, sometimes it’s hard to predict what template file is being used and loaded on the current page by just looking at the WordPress website frontend and the current page url. This can become even trickier if you are wrangling with a custom theme, made by someone else. Or, there might be specific plugins which hijack and override theme default template files. Yikes!

Show what template file is being used in WordPress

Luckily, there is a quick and easy way to find out the template being used. You can just add this little code snippet in your theme functions.php file:

That’s it! Make sure you are logged in, look at the very bottom of your website and you will see the path to the WordPress template file being loaded on the current page. Below is an example how it looks like on our own Meks website.

Detect which WordPress template file is currently being loaded (plugin solution)

While we personally prefer the above solution,  as it is probably easier to just comment/uncomment this piece of code whenever you need it, there are a couple of plugins which may help you to achieve the similar thing.

Fell free to install and experiment with one of these plugins:

  1. Show Current Template
  2. Reveal Template
  3. Which Template Am I
6Shares
Meks

We are a team of highly skilled professionals with years of experience under our belts, ready to tackle any WordPress related challenge.

Leave a Reply

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

You don't need to have loads of money to get a world-class WordPress website! All our themes are rated with the highest 5-star rating. Have a look and choose the best one for you.
Meks WordPress Themes
Meks