Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: How can I remove the limit on topic title

@robin-w

Moderator

This allows any length title

add_filter( 'bbp_is_title_too_long', 'rew_dont_bother', 10 , 4 ) ;

function rew_dont_bother ($result, $title, $max, $len ){
	return false ;
}

and this reduces content

//code to limit number of characters in topic contents to 500 characters
add_filter( 'bbp_new_topic_pre_content', 'rew_limit_topic_content' );
add_filter( 'bbp_edit_topic_pre_content', 'rew_limit_topic_content' );

function rew_limit_topic_content( $topic_content )
{
    /* Check for number of characters in topic contents  */
    if (strlen($topic_content) > 500) {
		$revised_content = substr($topic_content, 0, 500);
		}	
	else {
		$revised_content = $topic_content ;
	}		
 
    return $revised_content ;
}

Put this in your child theme’s function file – or use

Code Snippets

Skip to toolbar