I run this code in
front-page.php
as well in
category-foo.php
<?php echo is_page_template( 'front-page.php' ) ? "yes" : "no" ?>
and get both times "no" printed
i tried as well
<?php echo get_page_template() ?>
returning nothing.
I as well tried
<?php echo get_category_template() ?>
What I want to know, is in which main template file I am. E.g.
I want to call from header.php
<?php if ( currFilename(__FILE__) != "front-page" ) : ?>
<div>Fancy slogan</div>
<?php endif; ?>
which obviously does not work this way.
https://codex.wordpress.org/Function_Reference/get_page_template