How-to and Troubleshooting
11
Posts
4
Users
1
Reactions
1,874
Views
Nov 03, 2019 5:17 pm
Anybody here?
Jan 28, 2020 1:02 pm
Hello,
I did it with this code in functions.php of your theme or overriding functions.php of wpforo: (set max to 65 chars)
function max_title_length( $meta_title ) {
$max = 65;
if(is_array($meta_title) && !empty($meta_title)){
$title = implode(' – ', $meta_title);
} else {
return $meta_title;
}
if ( strlen( $title ) > $max ){
$title = substr( $title, 0, $max ). " …";
$meta_title = explode(' – ', $title);
}
return $meta_title;
}
add_filter( 'wpforo_seo_topic_title', 'max_title_length');
Page 2 / 2
Prev