How to Display recent post outside blog

Discussion in 'WordPress' started by doga, Jan 2, 2010.

  1. #1
    Hello All,

    I want to display my blog recent post on main page of website. my blog is in http://website.com/blog/ and i want to display recent post on http://website.com/

    I have gone through all wordpress but not able to workout.
    I am using this code to show
    <?php
    require('/the/path/to/your/wp-blog-header.php');
    ?>
    
    <?php
    $posts = get_posts('numberposts=10&order=ASC&orderby=post_title');
    foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(); echo "
    "; ?>
    <?php the_title(); ?>
    <?php the_excerpt(); ?>
    <?php
    endforeach;
    ?>
    Code (markup):
    but then it shows following error

    Fatal error: Cannot redeclare clean_url() in /public_html/blog/wp-includes/formatting.php on line 2153

    Not able to figure out how to resolve this error
     
    doga, Jan 2, 2010 IP