WordPress.org

Support

Support » How-To and Troubleshooting » Home Page: using index.php instead of home.php

Home Page: using index.php instead of home.php

  • I’m currently in the process of creating my clients homepage. I’m basing it on the Kubrick theme and tweaking it a bit to suit my clients’ needs. Got the header and footer looking really good but now I want to include a home.php file I created and uploaded it but instead it displays index.php content. Isn’t home.php the first file WP looks for and then index.php? That’s normally the case. But this time around I’m on Network Solutions for hosting so maybe things work differently there?

Viewing 11 replies - 1 through 11 (of 11 total)
  • What problem are you trying to solve by making a home.php?

    Yes, home.php should be the first one but it is outdated and will not work in future versions.

    Yes, home.php should be the first one but it is outdated and will not work in future versions.

    I never knew anything about that, can you elaborate on what’s being changed, is something intended to replace home.php or is support just being pulled?

    Sorry, sorry, I am sure I read that today but can’t find it back (after searching for an hour).

    It’s no problem, i’ll take your word for it if you’re sure… WP on the brain? perhaps something in a dream? … i know i confuse things like that sometimes… lol.. (not saying you imagined it, but i’ve done it before, so i’m sure it’s not beyond anyone else) .. 😉

    I didn’t know that either. So it would be better to actually make it index.php instead?

    Hi databell96
    I took my statement back but if you are making a special template avoid naming it home.php since home.php has a special role inside WP. Call it anything you like.
    Then again: what problem are you trying to solve with it?

    I’m creating a template as well and am in a similar situation. I want the homepage to have static content and recent post summaries, and right now I have it as index.php. After reading through some of the docs I dont know whether this should be the case or if I should rename it and use the admin panel to declare it as the new home page. I’ve seen themes that do this with index.php as the homepage though.

    Home.php seems like the obvious filename solution however, but I haven’t been able to find out what exactly home.php is used for. If it exists does wp call it automatically, thus bypassing using the admin panel to set a custom-named home page?

    @ mat:
    Use the admin panel to declare a page (not a post) as the static frontpage and also declare another page as the page for your posts to appear.
    About templates and which is used when:
    http://codex.wordpress.org/Template_Hierarchy

    Ok, but just for clarification, according to that, simply making a home.php would be another way to go about it since the home.php template isn’t used for anything other than the homepage.

    I don’t know why but sometimes the home.php doesn’t work form me (possibly something related to the qtranslate plugin?). Now, instead of home.php I use the front-page.php and voilà, no problems.

    I wish someone would update the Template Hierarchy page image.
    I’ve been referring to that for years and only today discovered that home.php no longer works.
    As biralucena kindly mentions above, front-page.php seems to have taken home.php’s place.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Home Page: using index.php instead of home.php’ is closed to new replies.
Skip to toolbar