Archived topic
Hide Time on Comment
5 replies · Started by Rizki on December 14, 2018
Viewing posts 1–6 of 6
Hi there,
Default comment's metadata is "December 14, 2018 at 05.00 PM", then how to remove "at 05.00 PM" ?
Thanks
Hi there,
go to Dashboard > Settings > General. Under Time Format select custom and leave the field blank.
I already try. When i do that, then metadata become "December 14, 2018 at". How to remove "at" ?
This function should do it:
add_filter( 'gettext_with_context', function( $translated, $text, $context, $domain ) {
if ( '1: date, 2: time' === $context ) {
$translated = get_comment_date();
}
return $translated;
}, 20, 4 );
It works Tom, very thanks :)
You're welcome :)
This archived topic is closed to new replies.