[resolved] Displaying links to more than one post (6 posts)

  1. Kristopher
    Posted 9 years ago #

    Hello. I'm wondering what I need to edit so I can pull off the effect of displaying a link to more than one post. An example would be a category called "Recent Posts" then having like the last 5 posts show up. Here's an example:


    That site also has a different feature that I'm trying to figure out. How do I create an excerpt to the last post, so that a user can click on a link to read the rest of it.?

  2. Ment0r
    Posted 9 years ago #

  3. Kristopher
    Posted 9 years ago #

    This is just related posts. I want to incorporate my five latest posts since the most recent.

  4. Kristopher
    Posted 9 years ago #

    Here's my example. This is my page:


    And this is the PHP Code I used to try to populate a ul with the past posts:

    <h2>Past Entries</h2>

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <li id="post-<?php the_ID(); ?>"><a>" rel="bookmark" title="Read this entry"><?php the_title(); ?></a> <span class="date"><?php the_time('M j') ?></span>
    <?php endwhile; ?>
    <?php else : ?>
    <h2 class="center">PHP Error: Not Found</h2>
    <?php endif; ?>

    I took it off of the index page with the way that it populates its posts. What am I doing wrong though? I get a not found error.

  5. TechGnome
    Posted 9 years ago #

    You might want to read through this page:

    It should be a lot of help.


  6. Kristopher
    Posted 9 years ago #

    Fantastic. That link was exactly what I was looking for. Thanks for the help!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.