WordPress Template hierarchy Debugging


Example

Its easy to get lost while debugging the hiearchy. You can use PHP's built in command debug_backtrace.

Put the next snippet inside any template you want to debug and view the generated page:

<!--
<?php print_r( debug_backtrace() ) ?>
-->