Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End My home.php didn’t work but was okay when renamed to front-page.php. Please explain!

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32870
    rbseid
    Member

    I’m using latest WP version. In the dashboard settings, my front page is set as a static page with the front page named Home. I want to create a file specifically for my front page contents but when I named it home.php it was not read. I thought home.php was read before either my page.php or index.php but this was not the case. When I renamed the file as front-page.php, it was then read first. Can someone explain why?

    #75377
    TheDoc
    Member

    It might have to do with setting a static page, though I’m not 100% sure. Maybe home.php is only used when a static page is not set.

    #75229
    jacorre
    Participant

    Don’t think you’re allowed to have the page name and file name be the same thing. I’ve seen issues with that before myself. If I want a custom home page I usually name the template file homepage.php and title the page as Home or the name of the site.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.