Archived topic
Changing Excerpt admin label
4 replies · Started by Bob on April 2, 2020
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)
Hi there,
Are you referring to the custom excerpt metabox seen in #1 here?
https://www.wpbeginner.com/plugins/how-to-customize-wordpress-excerpts-no-coding-required/
If so that's a WordPress feature so I would recommend checking with their support to see how to best translate that.
Let me know :)
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?
Actually, this is what I mean :
https://www.webnetcreatives.net/change-excerpt-box-label-wordpress/
I'm trying to change the label of the admin field 'excerpt' to something else (for admin users, when adding/editing posts)
Nope - GP doesn't control the default editor.
function.php in the child theme should work :)