Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter sandropel

    (@sandropel)

    I’ve created a new template following the instructions, and I’ve added the line <?php the_date(); ?>

    Unfortunately, the date is shown only at the first post displayed…

    Can you help me please?

    Thanks

    Hi Sandropel,

    You have probably sorted this by now but just in case;

    It sounds like you have added the line in the wrong place e.g. before the while loop, so the date is only showing once.

    Cheers
    Darren

    Or it could be that your posts were published on the same day in which case the the_date() will only show the date for the first post.

    In that case try get_the_date()

    Darren

    Plugin Author DaveE

    (@dpe415)

    Hi sandropel,

    I think @darrenparlett was correct in his response (see above). Let me know if this still isn’t working for you.

    basically, in your custom template file, You’d want to add the date after the post title like this:

    <h4 class="title"><?php the_title(); ?></h4>
    <span><?php the_date(); ?></span>
    </a>

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding date’ is closed to new replies.