• Hello everyone,
    Using this tutorial i managed to create a .php file to display latest posts, that could be embedded in any site, and it is almost perfect: Example

    For it to be 100% perfect i would need now to add links, so the titles would lead to full articles, or perhaps some sort of Read more… link at the end of each intro text.

    And it would also be great to find a way to add a small version of first picture used in the post.

    Could you people please give me an idea how to do that? I’m new to WordPress, but willing to learn.

    The code i use now:

    <?php
    // Include the wp-load'er
    include('wp-load.php');
    
    $posts = get_posts('numberposts=10&order=ASC&orderby=post_title');
    foreach ($posts as $post) : setup_postdata( $post ); ?>
    <?php the_date(); echo "<br />"; ?>
    <?php the_title(); ?>
    <?php the_excerpt(); ?>
    <?php
    endforeach;
    ?>

    Thanks a lot in advance!

The topic ‘Display recent posts list outside of WordPress’ is closed to new replies.