• zim

    (@zim)


    I’m in the process of building a new site using WP. The test site is at https://www.zims.com/blog/

    It’s using a slightly modified (mainly to include various plug-ins) version of the default theme.

    I’ve installed Dunstan’s Time of Day plugin (the latest version updated for 1.5 htpp://www.ifelse.co.uk/archives/2005/02/20/new-release-of-time-of-day-plugin/).

    The code of included in my index.php is:

    ‘<small><?php the_time() ?> on <?php the_date() ?> <!– by <?php the_author() ?> –></small>’

    If you want to see where I’ve included this take a look at the source for htpp://www.zims.com/wpindex.txt.

    Anyway the code seems to work fine for the top most post of any given day, however for subsequent posts on the same day it just shows the time without the date.

    Any suggestions?

    Thanks,

    Mark

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avenir

    (@avenir)

    You’ll need to use <?php the_time(); ?> with a date formatting string instead of <?php the_date(); ?> if you want the date to be displayed for all posts. Otherwise it’s only displayed for the first post with that date.

    Look at this for more info on date formatting strings.

    Thread Starter zim

    (@zim)

    If I feed ‘<?php the_time(); ?>’ parameters like say:
    ‘<?php the_time(l dS of F Y); ?>’

    The Time of Day plugin appears to fail and he page won’t load.

    mark

    Avenir

    (@avenir)

    I apologize. I wasn’t aware of the new release, so I didn’t know that the the plugin was now using WP’s the_time() function directly.

    If that’s the case, then I don’t know what to tell you. When the plugin was using it’s own function instead of WP’s, my fix would have worked. At least it does on my blog. You might consider switching back to the old version?

    i wish to separate the two functions, so i can call the real time on a separate function. how will i go about doing so?

    I stopped using Dunstan’s Time of Day because I didn’t like how it was integrating directly into the the_time tag. I now use the When plugin, which doesn’t do that:
    https://dev.wp-plugins.org/browser/when/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Time of Day Plug-in’ is closed to new replies.