Broken interior blog page using home template (FYI if you do this too)
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…
- The topic ‘Broken interior blog page using home template (FYI if you do this too)’ is closed to new replies.