Posted on 2 Comments

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

Wordpress Logo

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!