• zoblue

    (@zoblue)


    I need to move my blog’s old pages to the new template, but NOT using the Create Page feature. Will something like this work….?
    <code><?php get_header(); ?>
    <div id="content" class="narrowcolumn">
    my php code to connect to some other DB and spit out stuff or just general html code</div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Right now the code above isn’t working (see: https://blog.zoblue.com/link-list2.php; the original is link-list.php).

    See the Create Page won’t let me do PHP code in the content area. Also, it creates a page with a slash at the end instead of a free-standing page:

    https://blog.zoblue.com/created-page/
    as opposed to what I want:
    https://blog.zoblue.com/created-page.php

    any help? am I going about it the wrong way? thanks in advance!

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

    (@kafkaesqui)

    Is this at the top of your template:

    <?php
    require('./wp-blog-header.php');
    ?>

    You need to pull in wp-blog-header.php right at the start for a PHP file to become a WordPress document.

    Thread Starter zoblue

    (@zoblue)

    Ah, perfecto! Thank you dear, that saved a lot of headaches! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Make separate page based on templates?’ is closed to new replies.