[Resolved] Changing Excerpt admin label

Home Forums Support [Resolved] Changing Excerpt admin label

Home Forums Support Changing Excerpt admin label

  • This topic has 4 replies, 2 voices, and was last updated 4 years ago by Leo.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1223296
    Bob

    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)

    #1223701
    Leo
    Staff
    Customer Support

    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 ๐Ÿ™‚

    #1223709
    Bob

    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?

    #1223734
    Bob

    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)

    #1223758
    Leo
    Staff
    Customer Support

    Nope – GP doesn’t control the default editor.

    function.php in the child theme should work ๐Ÿ™‚

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.