• Resolved ixwa

    (@ixwa)


    Sorry for what must seem to be a blisteringly obvious distinction, but to this WP newbie I still haven’t managed to figure out (from all the forum posts and various other Q&A’s I’ve read) what the difference is between these two pages. (I’ve seen the template hierarchy, but this hasn’t helped.)

    Let’s pretend I’m just building a simple website, with no “blog”. What is my “home page”? home.php or front-page.php?

    I also have an index.php file in my themes folder (it only calls header/footer) but this never gets used, even for generic, one-off posts. Am I missing something?

    I do plan to have PHP code running on my home page, if that makes a difference…

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • What is my “home page”? home.php or front-page.php?

    Neither. Both of those are template files – not pages.

    Try having a read of Theme_Development.

    Thread Starter ixwa

    (@ixwa)

    I did and have been reading this all day, but thanks for posting the link.

    I have
    index.php
    home.php
    front-page.php

    And right now anything I preview appears to load with the home.php file, no matter what static front page setting I use, and even this doesn’t appear to use the get_header(); and get_footer(); calls. Not sure what part I’m missing in how these templates are assembled…

    Thread Starter ixwa

    (@ixwa)

    I had foolishly left an old index.html on the server, which is why everything was loading the same.

    Rename home.php to home-old.php

    Thread Starter ixwa

    (@ixwa)

    Thanks, had actually just figured it out. front-page.php is the default “homepage” if static is set–I just wasn’t seeing this because the old index.html was mucking up the works!

    Thanks for your very prompt replies ??

    home.php may also cause problems if you leave it there.

    Thread Starter ixwa

    (@ixwa)

    Really? So unless I plan to have a page somewhere that lists posts (all of them or just certain ones? not sure how this works) I should get rid of home.php altogether?

    In what circumstance would I want to hold onto it?

    Thanks again for your on-point help!

    I should get rid of home.php altogether?

    Yes. You only need front-page.php and index.php

    In what circumstance would I want to hold onto it?

    If you were using a old version of WordPress that didn’t recognise front-page.php.

    Thread Starter ixwa

    (@ixwa)

    OK, thanks very much.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Here we go again: home.php vs front-page.php’ is closed to new replies.