How do you quickly find out which template in your WordPress theme is being used without systematically going through each template?
WordPress uses a structure of templates formed in a hierarchy of importance, when one isn’t there it falls back to the next in the chain.
Click for a closer look
If you want to quickly see what template you are using in a post/page or other type you can add a function into your functions.php file in the theme which will display the path and template name at the foot of each page.
add_action('admin_bar_menu', 'show_template'); function show_template() { global $template; print_r($template); }
Once the function is added and you’re still logged in as admin, have a look at a page in the front end and scroll down to the footer, the path to the template being used is output at the bottom of the page – this is only visible to logged in admins via the dashboard.