WordPress.org

Ready to get started?Download WordPress

Forums

Creating a custom page (8 posts)

  1. murkok
    Member
    Posted 9 years ago #

    Back in WP 1.2 I had several custom pages, like "Contact me" which used the WP template. With WP 1.5 I can't find a way to do it. What I basically want to do is wrap my own php code with WP template, but something always get screwed up.

    Any ideas?

  2. frankiejr
    Member
    Posted 9 years ago #

    Do you mean the submenu option "Write Page" (underneath "Write" after clicking on it)?

    .frankiejr

  3. murkok
    Member
    Posted 9 years ago #

    No. "Write Page" will just create a db stored page. I want to create a real page with my own php code in it.

  4. Minna
    Member
    Posted 9 years ago #

    You could make it a page template, make a new page, and use the template on the page. That allows you to use PHP. Or you can get one of the plugins that do that (RunPHP is what I'm using on my WP1.5, but there are others).
    Or, include <?php require('./wp-blog-header.php'); ?> (with the correct path) at the top of a php file so you can use wp functions (get_header, get_footer - the lot)

  5. murkok
    Member
    Posted 9 years ago #

    Thanks for the suggestions Minna, but I do not want to create a DB stored page. I want to create a real page that will call the template's header, footer, etc.

  6. Minna
    Member
    Posted 9 years ago #

    That is why I added the last 'or' :) Include the require tag and you're able to use headers, footers etc

  7. murkok
    Member
    Posted 9 years ago #

    Thanks Minna. I tried that before, it didn't work as well as some other things. That's how I finally got to post here. Now that I tried it again it works.... go figure...

  8. atomix
    Member
    Posted 9 years ago #

    Can I get the code to do this? <----- newbie

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.