WordPress.org

Ready to get started?Download WordPress

Forums

is_page_template() isn't working in index.php? (1 post)

  1. Christiann
    Member
    Posted 6 years ago #

    I'm using is_page_template() in my index.php file. It doesn't work -- is there some other way I should be doing this? This is the code I'm using:

    <?php if (!is_page_template('spanish.php')) : ?>Return to Top<?php else : ?>Vuelva a la tapa<?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!

    (I hope this is OK to post here -- I got no response the the "themes" forum, and haven't come up with a solution on my own yet, so I'm trying this section.)

Topic Closed

This topic has been closed to new replies.

About this Topic