skip to Main Content

Determine what template page is currently working in WordPress

Ever needed to debug a wordpress template but not sure which one to edit? Here’s a quick hack simply put this code in your functions.php:

add_action('wp_head', 'show_template');
function show_template() {
global $template;

This will output the page/template that is currently running.. don’t forget to edit out though.. Have fun..


Editorial Staff at ETN Multimedia is led by Alphonse Tan. Page maintained by Alphonse Tan

Back To Top