Grow your CSS skills. Land your dream job.

WordPress – Posts Page

  • # November 11, 2008 at 7:04 pm

    Hi Guys!

    This is my first post but I have been a regular visitor to the website and forums for a while now!
    I have read a lot of useful things that have really helped, so thanks!

    However I can’t seem to find an answer to my current problem, here’s the scenario:

    I am making a wordpress website for a client. After seeing Chris’ last video(WordPress as a CMS) and how he created new template pages I realised that was just what I needed so immediately implemented that.

    I now have:
    Home Page – home.php
    Regular Pages – index.php
    Posts Page – blog.php

    All the pages have the correct template assigned to them so that they display properly, BUT in the admin section under ‘Settings > Reading’ I have set the home page to the correct static page, and the posts page to my blog page.

    It seems that the admin section is overriding my template files, and assigning the home template to the blog, rather than the blog template, or even the default template.

    What I want to do is have it use the template I have set it to use.
    Any ideas?

    If this post is in the wrong place I apologise, nowhere else seemed fiting though :?
    And if anything I have said doesn’t make sense let me know and I will try to clarify.

    Thanks!
    Mike

    # November 12, 2008 at 10:48 am

    keep posts as index.php otherwise your in for a whole lot of grief.

    go through the tutorial again, and this time go along with it in stages…….. and locally if you can to see how it works before going on the net.

    If I remember correctly you have to assign a template to the post/page you write.

    # November 12, 2008 at 11:00 am

    Well the posts should be index.php I only created another template for it when it wasn’t working.

    It seems to just use whatever template the home page uses. So I need to find out how to change that, if it is possible. Any ideas?

    # November 12, 2008 at 12:15 pm

    have you got your template in the page parent?

    # November 12, 2008 at 3:10 pm

    Page Parent is set to ‘Main Page (no parent)’

    Is that right?

    # November 12, 2008 at 3:49 pm
    "MikeC" wrote:
    Page Parent is set to ‘Main Page (no parent)’

    Is that right?

    if your happy with a new template, store it in the template folder, then on your reading partin in manage on the back end of wp choose the new template from

    remember the code:

    Code:
    < ?php
    /*
    Template Name: New Template
    */
    ?>

    at the top of your new template to be seen, then select the new theme, then under parent you will have a template selection where you can pick your new template

    # November 12, 2008 at 3:58 pm

    Yeah I have done, but instead of using the template I want it to use(the same as every page other than the the home page) it is using the home page template.

    # November 12, 2008 at 4:05 pm

    check above and save your template in your theme directory.

    save after you pick the theme, then visit site, and maybe force a refresh

    # November 12, 2008 at 5:02 pm

    I have just been through it all again in the order you said.

    The template name at the top of the template is correct, I have this:

    Code:
    < ?php
    /*
    Template Name: Blog
    */
    ?>

    I know the rest of the template is correct because I have just copied the template for the rest of the site and added that code at the top.
    I have chosen the template under ‘Page Template’ in the manage section.

    The only time it works is if I remove it from the "Front Page Dispays" field on the settings page under reading. Which is what led me to the conclusion that it is changing the template to another one when the page is set as the main posts page.

    # November 13, 2008 at 6:18 am

    I’ve been thinking. Would it be easiest to have only the posts page use wordpress, and just do all the other pages as plain HTML/CSS?

    Is that something I should avoid or would it be a good idea?

    # November 13, 2008 at 7:56 am
    "MikeC" wrote:
    I’ve been thinking. Would it be easiest to have only the posts page use wordpress, and just do all the other pages as plain HTML/CSS?

    Is that something I should avoid or would it be a good idea?

    that is exactly what I have done for a client.

    only use wordpress for their posts.

    # November 13, 2008 at 10:39 am

    Perfect, thanks for the help anyway!

    # November 13, 2008 at 12:26 pm
    "MikeC" wrote:
    Perfect, thanks for the help anyway!

    mind you I put the wordpress in as new after testing locally, and added it to a directory within the site

    e.g.
    resources/index.html
    resources/wordpress/index.php

    # November 13, 2008 at 3:12 pm

    I will probably do the same. I will let you know how I get on!

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".