Notifications
Clear all

wpForo 1.x.x [Closed] Thread Titles too long for SEO.

11 Posts
4 Users
1 Reactions
1,874 Views
Posts: 18
Topic starter
(@dnkrockzzzzz1)
Eminent Member
Joined: 5 years ago

Anybody here?

3 Replies
Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 4900

@dnkrockzzzzz1

I've contacted our SEO specialists and they confirmed that the wpForo SEO works fine, no necessary to remove or change anything. 

However, if you're a developer you can make the changes by yourself using the hook below:

wpforo_seo_topic_title

However, this is not recommended. If you do the changes the SEO of your forum will become worse.

(@dnkrockzzzzz1)
Joined: 5 years ago

Eminent Member
Posts: 18

@sofy

hi thanks for your answer. I´m not an developer. Any code which I can copy to a file and which file?

Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 4900

@dnkrockzzzzz1

I'm sorry I cannot provide any simple solution. This requires custom codding. You should find some developer to do this work.

Posts: 1
(@jclgranados)
New Member
Joined: 5 years ago

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