In header.php, is there a way to detect and notify which template displays the current page? For example, I tried something like:
<script type="text/javascript"> alert("<?php echo is_page_template(); ?>"); </script>
I would prefer an answer that does not require me to explicitly state and test each file name in this warning. But even when I entered the name of the template file, it warned empty, not true or false. Any ideas?
source share