Support » Fixing WordPress » home.php disables index.php?

  • Resolved mattshepherd


    This is me being thick, but I tried my best to understand how to set up a static page (a “front page”) while still keeping a blog “behind” it. Since index.php is the main blog site, I set the static front page up as, and put a link on to the “front page of the blog,” at

    But the link from to just re-loads my page. Somehow the index.php just sends the browser back to home.php, and there’s an eternal loop.

    What do I need to do to “salvage” index.php and turn it into the front page of my blog again?

Viewing 4 replies - 1 through 4 (of 4 total)
  • do you mean this

     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     * @package WordPress
     * Tells WordPress to load the WordPress theme and output it.
     * @var bool
    define('WP_USE_THEMES', true);
    /** Loads the WordPress Environment and Template */

    thats what index.php is ? or teh index.php of the theme?

    Completely wrong approach. And complicated. Both.

    You go into Settings > Reading and select an existing Page as your home/front page and select another one as your “posts page”. Done.

    No need for any home.php stuff – that was for earlier WP versions. And if exists, yes, it will take over the index.
    More: Template_Hierarchy

    Thanks! That was enough for me to puzzle it out. The Codex really turned me around and around on this one.

    The problem with using the “Reading” panel is that it ignores the is_home() function.

    Whatever page is set to be the “Posts” page remains the home, as far as the loop is concerned, making any calls to that function broken.

    Using a home.php template respects the is_home(), but breaks the posts page.

    Nevermind, I just discovered the is_front_page() function, introduced in 2.5.1 (I hadn’t used WP since 2.1 was intro’d).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘home.php disables index.php?’ is closed to new replies.