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


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: