• How can I, using the_time code, make the date display as:
    1st November 2004
    instead of
    1/11-2004
    I have tried several different ways, and I can’t make it to work.
    Any suggestions?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Under Options > Default Date Format enter
    jS F Y
    Enjoy! ??

    Thread Starter ludvig87

    (@ludvig87)

    Don’t work…
    It just shows date and year, not month….
    I have 2 different kinds it has to work…
    1: Has to show date once and then all posts underneath..
    2: Has to show date at each post…
    How can I fix both of those?

    Beel

    (@beel)

    If it doesn’t show the default date format then you have over ridden it in the function itself. the_date displays once for each day and the_time for each post.

    Thread Starter ludvig87

    (@ludvig87)

    I tried and remove everything from the_time to look like the_time() but it still just shows up like that…

    From my page (click my name)
    Default date format
    l j M Y
    Default time format
    h:i:s a l j M
    <?php the_time() ?>
    Which is in index.php in the section of code above
    <div class="storycontent">
    Change yours to that, then play with the settings ?

    Thread Starter ludvig87

    (@ludvig87)

    I tried putting both of the examples you used but neither of them worked. It shows this:
    02:16:12 pm Friday 12
    It doesn’t show the month as it should ??

    Thread Starter ludvig87

    (@ludvig87)

    I have tried, tried and tried.. It doesn’t work.
    When I use jS F Y
    it show 25th 2004
    When I use a l j M
    it show pm Thursday 25
    When I use l j M Y
    it show Thursday 25 2004
    I am using the <?php the_date() ?>
    Anyone who can tell me how to fix this?

    Beel

    (@beel)

    Disable all hacks and plugins and post a link, otherwise we’re likely done here unless somebody has experienced exactly this problem (which, from lack of responses, appears not).

    Thread Starter ludvig87

    (@ludvig87)

    https://www.deep-within.dk
    I have 2 plugins installed, recent comments and wp grins.. Can’t see how they can be a problem…

    I have the exact same problem with my wordpress install.

    https://www.esinner.com/

    I have <?php the_time(‘F jS, Y’) ?> called within my templates, yet I only have the day and the year showing also. I have disabled the my_hacks.php inclusion and also removed the php call to that function in my template, this makes no difference though.

    The only hack I use is the recent comments hack, though I will change to the plugin instead and see if that helps. Other than that, the the_time calls are placed in the wp loop and are structured the exact same way as in the default kubrick theme (which works), yet in my own theme the date doesn’t work. Go figure…

    I removed all my hacks and converted over to the plugin equivalents. No change though. Any ideas people?

    Ok, I got it figured out… It was one of my own php scripts. It used variables called $day, $month, $year and so on, that must have been used by the wp the_time function, either that or the PHP date function. Now that I have changed the variables names in my script I now have the month showing up.

    What I would suggest is using php and html commenting commands before and after each section of your template to see if temporarily removing that portion corrects the error. That will at least let you know which part of the page is causing the conflict. Once you have narrowed it down, post again here if you’re not sure why it is presenting a problem and we’ll probably be able to help you out.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘dmy as 1st November 2004 instead of 1/11-2004’ is closed to new replies.