Forums

is_home() in 2.6.2 (2 posts)

  1. galexkeene
    Member
    Posted 3 years ago #

    hi all.. trying to write my own theme that will display just (an excerpt) of my most recent post, plus a footer/sidebar when it is the homepage... but on all other pages, display like a normal blog (archives, etc)...

    codex seems to indicate after 2.1 under settings>reading there are some static front page settings (but this isn't really static), even though i don't see them.

    was that feature taken back out? will is_home() work for me in some sort of conditional thing within index?

    thanks, alex

  2. VelvetBlues.com
    Member
    Posted 3 years ago #

    is_home() returns true only on the main blog page
    is_front_page() returns true on the website home page

    So if you have a static front page and you want to show something on that, you'd use is_front_page(), and modify 'page.php'.

    If you are not using a static front page, then either should work. And you'd modify 'index.php'.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.