WordPress check if page template is index.php

In my wordpress template i need to check if the default page-template index.php is used or not. Normally i can do this with is_page_template but in this case it is not working:

<?php 
   if ( is_page_template( 'index.php' ) ) {
      echo "<p>Index.php is used</p>";
   }
?>

Read more here: WordPress check if page template is index.php

Leave a Reply

Your email address will not be published. Required fields are marked *