Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

  • @majid436

    Participant

    How do I change the word “Freshness” to another word? Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • @robin-w

    Moderator

    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 );

    @majid436

    Participant

    It works. Thanks.

    @majid436

    Participant

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

    @robin-w

    Moderator

    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

    @majid436

    Participant

    Thank you. This worked.

    @robin-w

    Moderator

    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