[resolved] Example of Non WP page which lists recent blog posts (3 posts)

  1. macmiller
    Posted 8 years ago #

    I'm just wondering if anyone has an example of a non blog page which displays a list of recent blog posts. I would like to look at an example. (I had my page working like this but it no longer works after upgrading WP to 2.3.1). I kind of in a panic trying to repair various problems after the upgrade and any help would be greatly appreciated.

  2. Such an example is rather trivial to create.

    Make a file called, say, temp.php. Put this in it:

    require('./wordpress/wp-blog-header.php'); // change this to fit your path
    <p>Recent Posts:</p>
    while (have_posts()) : the_post(); ?>
    <li><?php the_title(); ?> </li>
    <?php endwhile; ?>
  3. macmiller
    Posted 8 years ago #

    That is a good suggestion, it could be tweaked to limit the posts to a pre-defined number also. I found an existing plug-in which I tweaked a bit as an alternative to this method. Thanks a lot for the input Otto.

    The alternative is here:

Topic Closed

This topic has been closed to new replies.

About this Topic