Forums

[resolved] Static Page option (4 posts)

  1. designermonkey
    Member
    Posted 1 year ago #

    Ok...

    I have chosen the static page option to display a static page and a separate posts page.

    The posts page is working fine at http://www.designermonkey.co.uk/blog/

    I have created a specific page template called homepage.php, created a page in wordpress using the slug 'homepage' and set the static page to point to this page. However, when I go to my site root at http://www.designermonkey.co.uk/ wordpress isn't using my specific template file. It is using page.php instead...

    Does anyone know why? I've done everything that the codex says on how to make a page, but it won't work...

    I'm so frustrated with it.

  2. VelvetBlues.com
    Member
    Posted 1 year ago #

    Um... Have you set the appropriate page template when editing the page?

    You could also hard code in your page.php template to use a certain template when is_front_page() is true.

  3. stvwlf
    Member
    Posted 1 year ago #

    You have to tell Wordpress you want to use a custom page template with a page.

    Open the page you want to be the static page within the Manage Posts editor. Scroll down until you see Page Template section. Find your homepage template name in the pulldown, and select it as the template to use with that page.

    If you don't see your page there, odds are you did not put the special header that Wordpress requires in all custom template pages.

    Put this code at the very top of the php page

    <?php
    /*
    Template Name: MyTemplate
    */
    ?>

    substitute the name you want for MyTemplate, and save the file on your server. When you refresh the page you are editing, you should now see your custom page name in the Page Template section. select it and save the page again. It should then display using your template.

  4. designermonkey
    Member
    Posted 1 year ago #

    Thanks for that! It worked!

    That's very confusing you know, the way the Codex makes it sound is that Wordpress automatically links the two together, but obviously not!

    Thanks again for your help...

Topic Closed

This topic has been closed to new replies.

About this Topic