• I’m using is_page_template() in my index.php file and it’s not working. This is the code I’m using:

    <?php if (!is_page_template('spanish.php')) : ?>Return to Top<?php else : ?>Vuelva a la tapa</a><?php endif; ?>

    It’s on this page: http://omiusajpic.org/espanol/programas/
    (English version: http://omiusajpic.org/)

    This works fine on my sidebar.php, header.php, etc. I’m wondering if it doesn’t work in index.php for some reason? Any thoughts?

    Thanks everyone!

Viewing 1 replies (of 1 total)
  • Thread Starter Christiann

    (@xiann)

    I noticed that looked funny and removed the </a>. It’s still not working though. Now it looks like this:

    <?php if (!is_page_template('spanish.php')) : ?>Return to Top<?php else : ?>Vuelva a la tapa<?php endif; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with is_page_template() in index.php’ is closed to new replies.