Broken interior blog page using home template (FYI if you do this too) (3 posts)

  1. B1gJ4k3
    Posted 4 years ago #

    Because I've done this at least 3 times myself and never seem to remember it, I'm going to make sure I post in the forum and hopefully save other people some time.

    I was seem to always have problems with my interior blog page displaying right. It would display the content of one post and nothing else. It was also taking on the custom template for the home page, which it had never been assigned.

    I soon realize, after several hours of searching every time that I instinctively name my home template file "home.php." Apparently, this is a big no-no because as soon as I changed it to something else, even "homepage.php," everything worked fine and the posts get pull in as they should.

    Hopefully this will save someone some time in the future and maybe I'll find myself when I inevitably do it again and have to Google "broken interior blog page" or "interior blog page not working"

    But the moral of the story is, don't name anything in your template files home.php...

  2. jimmerd
    Posted 4 years ago #

    Exactly right. home.php is for the home page.

    is a great explanation of the hierarchy.

    It would display the content of one post and nothing else.

    That sounds like the single.php template file in the theme.

  3. mijogu
    Posted 4 years ago #


    Bless your little heart for posting this. I'm mildly new to WP and have seen this problem a couple times. You rule. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic