Change the Text for "Status Update" or other styled post

  • carmenj

    #3783

    I am interested in changing the text of the styled post format for “Status Update” to “News Flash”. I have searched the forums, but haven’t been able to locate where this text is being set.

    Prasanna SP

    #25951

    Add this to your child theme’s functions.php file

    function graphene_filter_gettext( $translated, $original, $domain ) {
    $strings = array(
    'Status update' => 'News Flash',
    );
    if ( ! empty( $strings[$original] ) ) {
    $translations = &get_translations_for_domain( $domain );
    $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
    }
    add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );

    Don’t forget to add php syntax if your child theme’s function file is empty

    carmenj

    #25952

    Works like a charm! Thanks for your help!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.