• Resolved Noobarmy

    (@noobarmy)


    I wish to create a new template page (so that i can use get_header() ect. and i wish to call it from a new php file in the root folder.

    eg
    Template File: pm_view.php
    PHP File: pm.php

    so pm.php needs to call standard stuff as well as load the desired template file.

    can someone gimme a code snippet or advice on how to do this. Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Either… or.
    You can have it as a Page (created in WP > Write . Write Page) and use your sepcial Page template – or, if you have it outside of the theme directory, you need a complete (php) file and put this at the top of it, before everything:
    <?php
    require('./path-to-your-blog/wp-blog-header.php');
    ?>

    and you can use all the WP functions in it.

    Thread Starter Noobarmy

    (@noobarmy)

    cheers worked great 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using a template page from new page’ is closed to new replies.