Support » Fixing WordPress » Example of Non WP page which lists recent blog posts

  • Resolved macmiller

    (@macmiller)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Such an example is rather trivial to create.

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

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

    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:
    http://wordpress.org/support/topic/148957?replies=1

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Example of Non WP page which lists recent blog posts’ is closed to new replies.