WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Difference between home.php and front-page.php (4 posts)

  1. starcoder
    Member
    Posted 3 years ago #

    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.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    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.

  3. starcoder
    Member
    Posted 3 years ago #

    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.

  4. wphelpcenter
    Member
    Posted 3 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.