Support » Fixing WordPress » Post Time and Date

  • On my site ( I have a category called ‘Social Diary’ in which people list social events in Britain which may be of interest to visitors. However when content is posted the time and date of the post is placed under the posts title. I am finding that this is confusing people as they believe this is the date and time of the social event rather than the time it was placed on the site. I believe the simple solution would be to place the word ‘Posted’ before the post date and time. How is this done? Does anyone have any better ideas?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Make that – sorry !

    First, check to see if your Theme uses a caegory.php template file. If it does, look in there for what I’m going to describe. If it doesn’t, then look in the index.php template file.

    Open it and search for the_time. It will show up in something like this:

    <h3 class="storytitle">
    <a href="<?php the_permalink() ?>" rel="bookmark">
    <?php the_title(); ?></a>
    <div class="meta">
    <?php the_time() ?></div>

    Now, there are two ways you can do this.

    1. Type in something like this into that section of code (try to match this but you can say something different):

    <div class="meta">
    Posted: <?php the_time() ?>

    2. Do the same thing but put the “posted” into an “echo” tag like this (this is the better choice of the two):

    <div class="meta">
    <?php _e('Posted: '); ?><?php the_time() ?>

    Take care not to delete or mess with the rest of the code around it.

    Here is more information that might help you:

    I’m using a slightly modified version of the standard theme. I therefore have index.php and category-85.php as an option to edit – I notice the code you have suggested is in both – which one do I edit?

    In fact it turns out that it is archive.php that has to be edited. Thanks for the code anyway!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post Time and Date’ is closed to new replies.