Skip to:
Content
Pages
Categories
Search
Top
Bottom

Edit text “You cannot create new topics”


  • enkoes
    Participant

    @enkoes

    Hi, i have a private forum where Participants are not allowed to post replies.

    Upon login, there is text message “You cannot create new topics” at the bottom of the forum. Can we edit the text with my own words?

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

  • Robin W
    Moderator

    @robin-w

    just can just add it to the other one

    add_filter( 'gettext', 'rew_change_must_be_text', 30, 3 );
    
    function rew_change_must_be_text( $translated_text, $text, $domain ) {
    	if ( $text == 'You must be logged in to create new topics.' && bbp_get_forum_id() == 2927 ) {
    		$translated_text = 'new text here' ;
    	}
    if ( $text == 'You cannot create new topics' && bbp_get_forum_id() == 2927 ) {
    		$translated_text = 'new text here' ;
    	}
    	return $translated_text ;
    }

    enkoes
    Participant

    @enkoes

    Legend! it works in the way I want. Thanks Robin.


    Robin W
    Moderator

    @robin-w

    🙂

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