WordPress.org

Support

Support » Themes and Templates » [Resolved] Difference between home.php and front-page.php

[Resolved] Difference between home.php and front-page.php

  • Hello *,

    can someone please explain the difference between home.php and front-page.php when used in Templates? i couldn’t find detailed information on that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    @esmi

    Forum Moderator

    home.php is a reserved file name on some servers and may be loaded in preference to index.php. front-page.php sounds like a generic custom page template.

    Personally I’d suggest avoiding home.php as a template filename. It may cause problems at some point.

    No, it’s not a generic custom page template. front-page.php is a new Template File in WordPress 3.0+.

    I am sure that the wordpress developers think something with these two template files. But what? Thats the question.

    home.php is applied on the main blog-post listing. If you use Settings -> Reading to change where blog posts are displayed by default, this template file is different then front-page.php.

    front-page.php could also display the latest posts on your homepage, but if you’ve altered the settings so that a Static Page is your homepage then this file would be used to display that (assuming you haven’t given that page a specific page template file to use).

    There is a good bit of information about Template Hierarchy here — http://codex.wordpress.org/Template_Hierarchy

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Difference between home.php and front-page.php’ is closed to new replies.
Skip to toolbar