Discuss your project
Wordpress Backoffice

WordPress: Rename the title of the excerpt editing area

It's true that when we talk about an excerpt, nobody understands what it refers to.To change the title of this editing area, just use the following snippet of code: add_filter( 'gettext', 'wpse22764_gettext', 10, 2 ); function wpse22764_gettext( $translatio...

WordPress: Rename the title of the excerpt editing area

It's true that when we talk about an excerpt, nobody understands what it refers to.
To change the title of this editing area, just use the following snippet of code:

add_filter( 'gettext', 'wpse22764_gettext', 10, 2 );
function wpse22764_gettext( $translation, $original )
{
if ( 'Excerpt' == $original ) {
return 'Sous-titre';
}else{
$pos = strpos($original, 'Excerpts are optional hand-crafted summaries of your');
if ($pos !== false) {
return  'Sous-titre affiché dans les push.';
}
}
return $translation;
}

Reproduce this customization today

The principle of the hook remains useful, but the administration screens and WordPress APIs have evolved since the publication. Test the code in a staging environment with the exact version of the site's core, theme, and plugins.

  • Save the files and the database before making any changes.
  • Control user capabilities, nonces, input validation, and output escaping.
  • Place customizations in a dedicated plugin or a child theme to preserve updates.

Reference: official WordPress plugin development manual.

Share this article