This code enables you to rename post formats via your child themes functions file :
add_filter( 'gettext_with_context', 'rename_post_formats', 10, 4 );
function rename_post_formats( $translation, $text, $context, $domain ) {
$names = array(
'Audio' => 'Custom Name',
'Chat' => 'Custom Name',
'Aside' => 'Custom Name',
);
if ( $context == 'Post format' ) {
$translation = str_replace( array_keys( $names ), array_values( $names ), $text );
}
return $translation;
}
Here’s an example :
Leave a Reply