Fix for date format bug in comments section of zbench WordPress theme

There exists a bug in the zbench WordPress theme when used together with qtranslate plugin resulting in a malformed date string in the comments section. Fortunately, there exists a quick fix for this problem.

Simply replace corresponding code with the following in the function mytheme_comment in functions.php:

<?php echo mysql2date('Y/m/d/ H:i', $comment->comment_date);?><?php edit_comment_link(__('[Edit]','zbench'),' ','') ?>

Pay special attention to

<?php echo mysql2date('Y/m/d/ H:i', $comment->comment_date);?>

which replaces

<?php printf(__('%1$s at %2$s', 'zbench'), get_comment_date(),  get_comment_time()); ?>

That’s it, enjoy!

You may also like...

2 Responses

  1. Daniel says:

    Geht hier die Kommentarfunktion?

Leave a Reply

Your email address will not be published. Required fields are marked *