WordPress.org

Ready to get started?Download WordPress

Forums

Conditional not working (2 posts)

  1. frescova
    Member
    Posted 1 year ago #

    I have tried this with is_home and is_front_page and no matter what I always get the same result, the code from the "else" clause displays no matter where I am on my site.

    Does anyone have an idea what my be happening?

    I have NOT set up my reading settings to point to another page.

    <?php if ( is_front_page()  ) { ?>
    THIS IS THE HOME PAGE
    <?php } else { ?>
    THIS IS NOT THE HOME PAGE
     <?php } ?>
  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    where is that code located, and could there be a custom query somewhere before in the same template?

Topic Closed

This topic has been closed to new replies.

About this Topic