• Resolved starcoder

    (@starcoder)


    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)
  • 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.

    Thread Starter starcoder

    (@starcoder)

    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 — https://codex.www.ads-software.com/Template_Hierarchy

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