• Hi there,

    I’ve come across an interesting little issue with a page that I’m working on for a client.

    The page can be seen here. When you go to the page using the URL or browse to it from the menu of this site, you see a page that shows all the posts from the four categories I’ve set up. The four categories have no parent category and have their own links under the menu item News (a custom menu item that goes straight to the URL of the news page).

    The problem is the news page is not meant to list posts, it’s meant to be a sort of portal page with four images that link through to the individual news category pages. I’ve setup a page-news.php template for this and have pointed the page at it. When I preview the page in the admin section using this link I can see the page as it’s meant to be displayed.

    What I can’t work out is why the page is showing Posts instead of the page template. Is news a built in tag or something? I don’t have “news” setup as a tag or category.

    Any suggestions or input would be appreciated!

Viewing 6 replies - 1 through 6 (of 6 total)
  • That page is your main posts page and, as such, will use your theme’s index.php template file automatically.

    Thread Starter Michael McMahon

    (@mjmcmahon2010)

    But I’ve specified that it should use the News page template, the page is called news and I have a template called page-news.php, so how/why is it still using the index.php template?

    Because the main post page will use your theme’s index.php template file automatically. You can’t over-ride this. The only option is to amend your theme’s index.php template file.

    Thread Starter Michael McMahon

    (@mjmcmahon2010)

    Okay, so the question is how does WordPress know that the News page should be my main posts page and not the home page or a page I called Stuff?

    Because you specified the News page as your main posts page in Settings->Reading.

    Thread Starter Michael McMahon

    (@mjmcmahon2010)

    Ahah! Thank you! It all makes sense now. I don’t actually recall changing that setting but it’s possible that the client did. It’s great to have a resolution and more importantly to understand how it works.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘News page showing posts instead of custom template page’ is closed to new replies.