Site logo

Archived topic

Changing Excerpt admin label

4 replies · Started by Bob on April 2, 2020

Viewing posts 1–5 of 5

I'm trying to change the "Excerpt" label in the admin to "Dek"; I've been looking around and it seems that this should work:

add_filter( 'gettext', function( $translated_text ) {
if ( 'Excerpt' === $translated_text ) {
$translated_text = 'Dek';
}

return $translated_text;
} );

But it's not doing anything. I have it in functions.php (does it need to go within something?). Also, is anything special needed to make it work on all custom post types? (I have been testing on the regular Posts, but will need it elsewhere as well)

Yes, I'm just wondering if there is anything GeneratePress-specific that might cause problems/need something to be done differently. So it SHOULD just work in the functions.php of a child theme, if I'm doing it correctly from a Wordpress standpoint?

Nope - GP doesn't control the default editor.

function.php in the child theme should work :)

This archived topic is closed to new replies.