Support » Fixing WordPress » showing date

  • Hello, how can I show the date on each post even if they’re posted on the same day?

Viewing 6 replies - 1 through 6 (of 6 total)
  • change <?php the_date(); ?> to <?php the_time(“m/d/y”); ?>

    thanx a lot!!

    Now you’ll know I’m still a newbie, but in which file should this mod be made?

    Mark (podz)


    Support Maven


    I found this one only in index.php. (Maybe the code was formatted in the template [DarkFire]. Note the unclosed leading quote mark :
    <?php the_date(”,'<h2>’,'</h2>’); >
    I tried replacing it with this but it didnt’ work:
    <?php the_time(“d-M-Y”); ?>
    Also tried it straight from the screen at Other Options (using the date code in the time string) but it also didn’t work.
    Does this seem like it’s my fault?

    Okay, I got it.
    The original in 1.2 now seems to look like this in index.php:
    <?php the_date(”,'<h2>’,'</h2>’); ?>
    Using cLin’s great little fix above, I added my <h2> formatting back to it like this:
    <h2><?php the_time(“d-M-Y”); ?></h2>
    Easy enough I suppose, unless you don’t find these things necessarily easy 😀 so I thought I would share it!
    Notice that cLin’s fix shows the formatting m/d/y, but in case you also didn’t realize, this was just a sample format (mine is different and also works).
    I guess I can call this my first Chron job 😀

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