
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 that aggravation by assisting designers and developers by displaying the template being used to render the currently displayed page in WordPress. This can be shown in one or more of the following methods:
By default, the theme-relative path to the theme template file used to render the page is shown in the admin bar. The settings page for the plugin, at ‘Design’ -> ‘Reveal Template’, allows you to control and configure this particular method. Note: even if enabled by the setting, the admin bar entry also only appears if the admin bar is showing and if the user has the ability to see the revealed template.
By default, the theme-relative path to the theme template file used to render the page is shown in the site’s footer. The settings page for the plugin, at ‘Design’ -> ‘Reveal Template’, allows you to control and configure this particular method. Note: even if enabled by the setting, the footer output only appears if the theme follows the recommended practice of calling the wp_footer() template tag at some point and the user has the ability to see the revealed template.
A widget named “Reveal Template” is made available which can be used to display the theme template file used to render the page in any widget location.
A shortcode called ‘revealtemplate’ is made available which can be used in post/page content to display the theme template file used to render the page. Currently it supports two possible attributes:
Examples: [revealtemplate type="absolute"], [revealtemplate type="filename" admin="0"]
A template tag is also provided which can be used to display the theme template file used to render the page.
<?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, theme-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:
This plugin is primarily intended to be activated on an as-needed basis.
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
The plugin provides one template tag for use in your theme templates, functions.php, or plugins.
$echo (bool)
Optional. Echo the template info? Default is true.
$template_path_type (string)
Optional. The style of the template’s path for return. Accepts: ‘absolute’, ‘relative’, ‘theme-relative’, ‘filename’. Default is ”, which causes the function to use the template path type configured via the plugin’s settings page.
<?php //Output the current template
c2c_reveal_template( true, 'theme-relative' );
?>
<?php // Retrieve the value for use in code, so don't display/echo it.
$current_template = c2c_reveal_template( false, 'filename' );
if ( $current_template == 'category-12.php' ) {
// Do something here
}
?>
Starting from $0 per month.
Rating
Reviewers
16 reviews
Tags
Developed By
Scott Reilly
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Contact Form plugins for Wordpress
Maps plugins for Wordpress
Translation plugins for Wordpress
Chat plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Contact plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Forms plugins for Wordpress
Comments plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Comments plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Portfolio plugins for Wordpress
Video Player plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Inventory plugins for Wordpress
Testimonials plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Analytics plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Security plugins for Wordpress
Ads plugins for Wordpress
Music Player plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Membership plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Video Player plugins for Wordpress
Tabs plugins for Wordpress
Social Feeds plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Add an FAQ section to your site to answer common questions, reduce support requests, and give visitors a smoother and more confident user experience.
Add a testimonials slider to your site to showcase real customer feedback, build credibility, and increase trust that leads to higher conversions.
Create real estate listings with a listings widget that displays properties clearly, supports customization, and helps visitors explore homes more easily.
Use an order form to let customers submit product orders, save entries, receive notifications, and collect payments through PayPal or Stripe for a smoother buying experience.
Use a sticky video that stays visible while users scroll to keep content in view, increase watch time, and boost engagement.
Collect candidate information with a job application form that organizes submissions, streamlines hiring, and helps you manage applicants efficiently.
Use feature voting so users submit ideas, vote on requests, and help you prioritize product updates by real customer demand.
Show Google Play reviews for your Android app to build trust, strengthen credibility, and help visitors make confident download decisions.
Show Medium articles in a Medium feed that keeps content fresh, improves readability, and helps visitors discover more posts.
Add an events calendar to your site so visitors can view upcoming activities, improving engagement and event visibility.
Showcase videos with a video carousel that rotates or slides clips, improves visual design, and keeps visitors watching and engaged.
Display and manage customer reviews from multiple platforms in one place to build trust and highlight brand credibility.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
