• Hi there, I’m trying to list an author’s stories on the author’s page by date.

    Here’s what I’m trying to achieve:

    Nov. 9
    this is an entry
    this is also an entry
    so is this
    Nov. 8
    this is an entry from the previous day
    this too
    Nov. 7
    OK, I think you get the idea

    The code I’m using gives me this…

    Nov. 9
    this is an entry
    Nov. 9
    this is also an entry
    Nov. 9
    so is this
    Nov. 8
    this is an entry from the previous day
    Nov. 8
    etc, etc, etc.

    I think I’m close to having it right, but I might be missing
    something. Any suggestions?
    This is the code I’m using…

    <!-- The Loop -->
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <dl class="userlist">

    <dt><?php the_time('d M Y'); ?></dt>

    <dd><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent
    Link: <?php the_title(); ?>"><?php the_title(); ?></a></dd>

    <?php endwhile; else: ?>
    <?php endif; ?>
    <!-- End Loop -->
    </dl>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Read about the_date and the_time.

    Thread Starter freshyill

    (@freshyill)

    OK, I figured it out. Just to make these forums a little less useless for the next poor guy who comes along, with the same question, I’ll actually answer it.

    I just needed to use this in place of where I have the_time: <?php the_date(); ?>. Would it have been so painful to actually explain that?

    Hopefully this will help somebody else in the future.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘trying to list stories on author page’ is closed to new replies.