Support » Fixing WordPress » Pull wordpress pages to personal website

  • Hi guys,

    Okay, I’ve been messing around with my blog and website to try integrate them both. They are both on the same server.

    My blog is at and website at

    I’ve been able to pull the latest posts etc with the wp-load.php file such as;

    // Include WordPress
    define('WP_USE_THEMES', false);
    //exact path for wp-load.php.
    // This file is kept in the root of wordpress install
    //Query wordpress for latest 4 posts
    <?php while (have_posts ()): the_post(); ?>
        <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

    However, I’m wanting to be able to pull a whole page from my wordpress blog, by a page I mean, the content of a specific page, the blog/?page_id=51.

    I’ve tried to read up on the wiki, but I’m really struggling here.


Viewing 1 replies (of 1 total)
  • just replace your query_posts('showposts=5'); with

    $args = array('post_type' => 'page', 'order' => 'asc', 'post__in' => array(51, 141, 143)); query_posts($args);

    change page id in array if you want single put a single id.

Viewing 1 replies (of 1 total)
  • The topic ‘Pull wordpress pages to personal website’ is closed to new replies.