• Whats the easiest way in wp-1.5 to include a php page instead of the blog postings? There must be some place in the default theme that calls a certain page from the theme directory but I can’t find it. Any help is much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The WordPress Codex is your friend. Read about Pages and scroll down to “Pages can use Different Templates”.

    Thread Starter BoBB

    (@bobb)

    I don’t want to use a different template for a wordpress page, I want to be able to include a different php page instead of the one that calls the posts.

    Thread Starter BoBB

    (@bobb)

    Ah, nevermind, I had to read that a few times before I could understand it heh

    This is a useful code snippet for making an “edit this page” link to whatever page you’re including. You’ll need to change the number used in this example, unless the page you’re including has an ID of “2”.


    if(is_home()) { // if this is the home page (in this example, i'm including a post with id=2)
    $original_post = $post; // save the current $post for later
    $post = $wpdb->get_row('SELECT * FROM wp_posts WHERE ID="2"'); // get the page you're including
    }
    edit_post_link('Edit this Page', '<li>', '</li>'); // echo the edit link
    $post = $original_post; // set $post back to the original value

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Include page’ is closed to new replies.