This handy little function is ideal for working out exactly what template file is in use on any post or page
This is useful when building themes or converting HTML into a WordPress theme as it allows you to do a view source on a page or a post and see exactly what php template file WordPress is using.
/* * * Print the template file in use on each page * * */ function vauss_template_inuse() { global $template; echo "<!-- " . basename($template) . " -->"; } add_action( 'wp_footer', 'vauss_template_inuse', 100 );