2

I am looking for a Wordpress plugin that prints file template names, maybe with a designating border. Magento has "template hints", as you can see in this screenshot:

magento

If there is not such a plugin and someone would like to develop it with me, let's do that, too!

3
  • Have you already (a) tried something and (b) searched the site? I know that I have written an answer about exactly that some time ago.
    – kaiser
    May 30, 2014 at 17:50
  • 1
    a) I have looked around the internet with various keywords such as wordpress, template, hints, path, print, echo, file path, plugin. I found a dead plugin called templatepath that isn't compatible anymore. b) Searched the site with similar keywords but I didn't really find anything. I did find your answer though! Thank you.
    – dmanexe
    May 30, 2014 at 18:13
  • 1
    However, that solution doesn't really provide the front-end visualization of files. It just prints a list of files loaded by that page. While good, it's not exactly what I am looking for.
    – dmanexe
    May 30, 2014 at 18:14

2 Answers 2

2

I use a plugin called Query Monitor, that does a whole bunch of stuff, including showing the page's template. It's in the WordPress Repo.

2
  • 1
    Please add a link to the plugin and info from the plugin page to show what the plugin does May 31, 2014 at 4:36
  • Find it right over here in the Wordpress plugin repo: Query Monitor "View debugging and performance information on database queries, hooks, conditionals, HTTP requests, redirects and more."
    – dmanexe
    May 31, 2014 at 21:37
4

Here is what I use. It will display the current template file name to logged-in users. Paste this in your functions.php file and comment out/remove when not in use.

// REMOVE - show template name
  add_action('wp_head', 'show_template');
  function show_template() {
  global $template;
  global $current_user;
  get_currentuserinfo();
  if ($current_user->user_level == 10 ) print_r($template);
  }
// REMOVE - end show template name
1

Not the answer you're looking for? Browse other questions tagged or ask your own question.