Forums

2.1 blog page uses wrong template (6 posts)

  1. maelgwn
    Member
    Posted 5 years ago #

    Ok I have a static frontpage, using WP 2.1 and then I have the blog page set to a page called 'News'

    When i open 'News' it displays incorrectly, using the page.php template instead of the index.php template. When i open any category/post they display fine and as expected.

    Any ideas how to fix this?

  2. JoyceD
    Member
    Posted 5 years ago #

    Edit the page and select the index template in the box that says "Page Template".

  3. maelgwn
    Member
    Posted 5 years ago #

    tried that, it doesnt work

    Also, before i had a 404.php page, it would load a non existant page as the blog, using the correct template. Weird eh?

  4. maelgwn
    Member
    Posted 5 years ago #

    bump

  5. Chris_K
    Member
    Posted 5 years ago #

    You'll probably want to glance over the Pages documentation to wrap your head around this (oh, and Template_Hierarchy would be great reading too)

    Short answer: Copy index.php to news.php, edit it to make it a Page Template file (see Pages for how).
    Modify your "News" page to use this new template file.

  6. maelgwn
    Member
    Posted 5 years ago #

    I actually solved it by changing the filename of one of my templates from home.php to frontpage.php. That is really weird and looks to be a bug to me. (This means i was actually wrong and it wasn't using the page template).

    PS the problem with your solution is that categories would load using a different template than the news page

Topic Closed

This topic has been closed to new replies.

About this Topic