• Resolved ixwa

    (@ixwa)


    I understand that WP looks at the theme’s directory to determine if there are any template php files that must be used before it reverts to the default single.php, loop.php, sample.php etc pages.

    My basic question question is: Do I create a “hello-there” WP Page in the dashboard and then–if I want to totally customize how this page appears/behaves–I create and manually upload a “hello-there.php” file into my theme directory?

    I had done this with success, but just in the last day I’ve noticed that WP is reverting to the default file (and the Page content in the Dashboard) instead of looking at the php file I have in th theme directory.

    (Not sure if this could have anything to do with having made a minor change to my permalink structure, but could it be related?)

Viewing 1 replies (of 1 total)
  • Thread Starter ixwa

    (@ixwa)

    Ah, never mind: solved it. Just when you think you’re done, you realize that with WP’s functionality comes a bit more work:

    For each WP Page you create in the dashboard for which you want total customization, you must create a template file in the theme directory THAT INCLUDES the name of the template (probably create this first), then just choose this template for that page in the dashboard.

    For those reading this, remember to include these lines in the top of the new template document:

    <?php
    /*
    Template Name: Your template name
    *
     * The template for displaying whatever you want.
     * Blah blah
     */
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘General question about WP Pages using theme dir .php files’ is closed to new replies.