Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to change the word "Freshness" to something else?

Viewing 6 replies - 1 through 6 (of 6 total)

  • Robin W
    Moderator

    @robin-w

    add this to your functions file

    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'Freshness' ) {
    	$translated_text = 'whatever-new-word-you-want';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );

    Majijiboo
    Participant

    @majid436

    It works. Thanks.


    Majijiboo
    Participant

    @majid436

    Do you have similar code to change the word “Forum” to something else? Thanks.


    Robin W
    Moderator

    @robin-w

    If it’s just where it says forums, then the same code should work, it just needs a different function name – each function needs to be unique so

    function change_translate_text2( $translated_text ) {
    	if ( $translated_text == 'Forums' ) {
    	$translated_text = 'whatever-new-word-you-want';
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text2', 20 );

    If you want to change it in url’s and breadcrumbs, then

    dashboard>settings>forums and change the forum root slug


    Majijiboo
    Participant

    @majid436

    Thank you. This worked.


    Robin W
    Moderator

    @robin-w

    Great, glad you’re fixed !

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar