WordPress.org

Ready to get started?Download WordPress

Forums

Integration of Posts (3 posts)

  1. bwhiting
    Member
    Posted 4 years ago #

    OK I was looking on the board and what not to get some help on importing posts into my website from my wordpress document and its like really hard for some reason to import the correct file actually.

    I have this code in my post.html page but I believe that I am actually missing something that is more important:

    <?php
    // Include WordPress
    define('WP_USE_THEMES', false);
    require('/about/wp-load.php');
    query_posts('showposts=3');
    ?>
    <?php while (have_posts()): the_post(); ?>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <?php the_title(); ?></a></h2>
    <?php the_excerpt(); ?>
    <p><a href="<?php the_permalink(); ?>">Read more...</a></p>
    <?php endwhile; ?>
  2. bwhiting
    Member
    Posted 4 years ago #

    <?php
    define('WP_USE_THEMES', false);
    require('/about/wp-blog-header.php');
    ?>
    
    //Get the last 3 posts.
    <?php query_posts('showposts=3'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
    <?php endwhile;>

    would this work instead for the actual coding or would it require a whole new set of codes to do so? because i am thinking that the actual link to the blog-header.php file is correct but it seems to not want to open in my dreamweaver to check the links too

Topic Closed

This topic has been closed to new replies.

About this Topic