return $date;
}
but it error,and it display two repeat date.
]]>I am sorry that the code you are using is not working as expected.
The General Settings (Dashboard → Settings → General) in WordPress enables you to change the format of the date which affects the comments.
There are several formats to choose from and you can also enter in a custom date format.
With regards to the code you are using, please make sure you are using the code in a class and the class is properly instantiated. If you have just added it in functions.php file then it won’t work.
Kindly refer to this link by clicking here to see the correct code OR you can use the following Php code:
function custom_comment_date( $date, $d, $comment ) {
return mysql2date( 'F jS, Y', $comment->comment_date );
}
add_filter( 'get_comment_date', 'custom_comment_date', 10, 3);
Please let me know if I can help you any further
Usman
]]>