Developer plugin to echo template namesfilepaths

admin2025-06-04  3

Closed. This question is off-topic. It is not currently accepting answers.

Asking to recommend a product (plugin, theme, book, hosting provider), tool, library, or off-site resource is out of scope for this site, as it attracts opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 11 years ago.

Improve this question

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:

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

Closed. This question is off-topic. It is not currently accepting answers.

Asking to recommend a product (plugin, theme, book, hosting provider), tool, library, or off-site resource is out of scope for this site, as it attracts opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 11 years ago.

Improve this question

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:

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

Share Improve this question edited Jan 16, 2019 at 8:14 Glorfindel 6113 gold badges10 silver badges18 bronze badges asked May 30, 2014 at 17:46 dmanexedmanexe 532 silver badges10 bronze badges 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 Commented 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 Commented 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 Commented May 30, 2014 at 18:14
Add a comment  | 

2 Answers 2

Reset to default 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.

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
转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749006564a315560.html

最新回复(0)