• Resolved dstall

    (@dstall)


    Comments display past date (Feb 28) not date created (Mar 2). In Dashboard, Comments show correct date (Mar 2), but display below posts with incorrect date (Feb 28).

    Any plugins associated with comments (Collapsible Comments, and WordPress Thread Comment) have been deactivated and deleted, but problem persists.

    Core files (wp-includes/comment-template.php and commment.php) have also been deleted and replaced, but that has not corrected problem either.

    General/Settings are correct, as is clock on PC.

    Theme comments.php file (which previously worked fine on Feb 28 and now seems stuck on that date), calls date as follows –
    <div class=”datebox”>
    <p class=”month”><?php the_time(‘M’) ?></p>
    <p class=”day”><?php the_time(‘d’) ?></p>
    <p class=”year”><?php the_time(‘Y’) ?></p>
    </div>

Viewing 8 replies - 1 through 8 (of 8 total)
  • Have you tried repairing your database?

    Thread Starter dstall

    (@dstall)

    Installed Chan’s WP-DBManager plugin and repaired database, but problem persists.

    Thread Starter dstall

    (@dstall)

    Just noticed that post date is overriding comment date. Comments that were being dated Feb 28 were for post dated Feb 28. Comments for another post dated Feb 21 are dated Feb 21.

    Sounds like you have the wrong template tag in your theme’s comments.php template. You could try droping a copy of that file into the WordPress pastebin and posting the pastebin url here.

    Thread Starter dstall

    (@dstall)

    Try changing:

    <div class="datebox">
    <p class="month"><?php the_time('M') ?></p>
    <p class="day"><?php the_time('d') ?></p>
    <p class="year"><?php the_time('Y') ?></p>
    </div>

    to:

    <div class="datebox">
    <p class="month"><?php comment_time('M') ?></p>
    <p class="day"><?php comment_time('d') ?></p>
    <p class="year"><?php comment_time('Y') ?></p>
    </div>

    http://codex.wordpress.org/Template_Tags/comment_time

    Thread Starter dstall

    (@dstall)

    Made change, but post date still overrides comment date. Upgraded to WP 2.9.2 if by chance I’d made some change to a core file, but that didn’t help either.

    Thread Starter dstall

    (@dstall)

    My theme is built on Starkers Theme, so I downloaded latest version of Starkers and replaced my theme comments.php with Starkers comments.php. Comment dates now display and post dates no longer override comments dates. I can now revise code for datebox and style as wanted.

    Thanks for your help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Comments display past date, not date created’ is closed to new replies.