try adding this to your functions file
function change_translate_text( $translated_text ) {
if ( $translated_text == ‘%s ago’) {
$translated_text = ‘%s’;
}
return $translated_text;
}
add_filter( ‘gettext’, ‘change_translate_text’, 20 );
Functions files and child themes – explained !
Thank you so much! This worked perfectly.
Would you now how to abbreviate the verbiage? I’d prefer x hrs, x mins if possible. Just thought I’d ask. Thank you again.
Here is a straightforward approach to abbreviating the time. Just put it in your functions.php file. You can modify the abbreviations as you wish:
add_filter( 'bbp_get_time_since', 'abbreviate_time' );
function abbreviate_time ( $output ) {
$output = str_replace( 'minutes', 'min', $output );
$output = str_replace( 'minute', 'min', $output );
$output = str_replace( 'hours', 'hr', $output );
$output = str_replace( 'hour', 'hr', $output );
$output = str_replace( 'weeks', 'wk', $output );
$output = str_replace( 'week', 'wk', $output );
$output = str_replace( 'months', 'mo', $output );
$output = str_replace( 'month', 'mo', $output );
$output = str_replace( 'years', 'yr', $output );
$output = str_replace( 'year', 'yr', $output );
return $output;
}