• I’ve had a working index.php with my handmade template on the blog I made for my Boy Scout Troop, along with astatic frontpage. But when I tried to make a home.php to be used as a template for the frontpage, so that I could dynamically show the last post, all pages used the home.php as the default template, including the News page, which was supposed to use index.php to list posts.

Viewing 2 replies - 1 through 2 (of 2 total)
  • That’s the way the Hierarchy works. For that static front page, use a different page template, because home.php will be used to display the posts page (see Administration > Settings > Reading).

    Don’t name the file ‘home.php’. WordPress looks for a file of that name during the load process and uses it if found. Look at the template hierarchy page.

    1. WordPress will load the static page if there is one. That works, right?
    2. Then it will load home.php if there is one. In your case, there is so it gets used.

    Just name your page front.php instead.That one isn’t in the hierarchy.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Template Page Conflicts’ is closed to new replies.