Plugin Directory

Reveal Template

Version: 2.3 Reveal the theme template file used to render the displayed page, via the footer and/or template tag.

Reveal the theme template file used to render the displayed page, via the footer and/or template tag.

Designers and developers know that it can sometimes be confusing and frustrating to determine the exact template being utilized to render the currently displayed page in WordPress. Sometimes page or category specific templates exist, or a page/post has been set by the post author to use a particular template, or the current theme doesn't employ certain templates causing WordPress to fall back to others.

This plugin relieves the aggravation by assisting designers and developers by displaying the template being used to render the currently displayed page in WordPress. This typically appears in the site's footer (though only if the theme follows the recommended practice of calling the wp_footer() template tag) at some point. Also, obviously this can only universally apply to the site if said footer is actually used on every page.

A template tag is also provided which can be used to display the template file.

<?php c2c_reveal_template(); ?>

By default, c2c_reveal_template() will echo the template name. To simply retrieve the template filename rather than displaying it:

<?php $template = c2c_reveal_template(false); ?>

The template tag also takes a second argument which be can be one of the following: absolute, relative, template-relative, filename. This determines the path style you'd like reported. If not specified, it uses the default defined in the plugin's settings page.

Examples of path types:

  • "absolute" : /usr/local/www/yoursite/wp-content/themes/yourtheme/single.php
  • "relative" : wp-content/themes/yourtheme/single.php
  • "theme-relative" : yourtheme/single.php
  • "filename" : single.php

This plugin is primarily intended to be activated on an as-needed basis.

Links: Plugin Homepage | Plugin Directory Page | Author Homepage

Requires: 3.1 or higher
Compatible up to: 3.5.1
Last Updated: 2012-12-18
Downloads: 6,529

Ratings

4 stars
4.6 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1
50,2,1
100,1,1
100,1,1
100,1,1