WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Where do I find the default page template (6 posts)

  1. stemckinney
    Member
    Posted 4 years ago #

    I have a problem with my posts page. I have a static page and a posts page. The problem is the posts page is taking the styling of my page template called 'Homepage', and I can't understand why when the posts page is set to the default page, which I've changed in index.php. So I'm just wondering what it's related to?

    http://test.iamsteve.me/blog - posts page

    If any more information is needed just ask, many thanks.

    Steve

  2. Equal Web Creative
    Member
    Posted 4 years ago #

    If in the setting page you have set the home page as a static page and the posts page as a static page then the template php file in your theme folder that controls the look of the posts page is index.php

  3. stemckinney
    Member
    Posted 4 years ago #

    I have edited the index.php file, yet for some reason the posts page takes the styling of my own template. I've tried naming the index.php as blogpage and setting it that way it doesn't work and I'm certain it's on the default template for the posts page.

  4. stemckinney
    Member
    Posted 4 years ago #

    Still need help to solve this it's not a problem with plugins either as it's installed through multisite. I have tested with other themes and they display the correct things for the blog page.

  5. keesiemeijer
    moderator
    Posted 4 years ago #

    The default template file for pages is page.php. If you use a static front page and you selected a "Posts Page" index.php is not used. from the codex :

    * Front page - Select in the drop-down box the actual Page that you want displayed as your front page. If you do not select a choice here, then effectively your blog will show your posts on both the blog's front page and on the Posts page you specify. If you would like to create a static home page template file, do not name it home.php, otherwise you will encounter problems when you try to view the "blog"/"posts" section of your site. To get around this, just name it anything but home.php, for example, myhome.php
    * Posts page - Select in the drop-down box the name of the Page that will now contain your Posts. If you do not select a Page here, your Posts will only be accessible via other navigation features such as category, calendar, or archive links. Even if the selected Page is Password protected, visitors will NOT be prompted for a password when viewing the Posts Page. Also, any Template assigned the Page will be ignored and the theme's index.php (or home.php if it exists) will control the display of the posts.

    So if you do not select a "Posts page" in Settings/Reading, index.php is used

  6. stemckinney
    Member
    Posted 4 years ago #

    Thank you for that. The problem was my file being named home.php, if only I'd have come across that.

Topic Closed

This topic has been closed to new replies.

About this Topic