Hello. Can anyone please tell me how to customize title tags in the forums? How can I have a title tag that is different from the name of the forum?
I looked around for this info, but was unable to find it.
Thanks!
Hello. Can anyone please tell me how to customize title tags in the forums? How can I have a title tag that is different from the name of the forum?
I looked around for this info, but was unable to find it.
Thanks!
What do you mean by title tag? I don't understand. Do you mean the text that appears next to the bb icon at the top of the page?
Sorry if Im not being clear enough - Im a newbie. I mean the text that shows up in the browsers title bar: <title></title>. When I enter a name for a forum in the Forum Managment Inteface, that name appears in the title tag, however I want the title tag to contain more text than the forum name.
Oh, sorry. Yeah. I getchoo. Yes. The filter you want to use is bb_title. The way filters work is that you tell bbpress what you want to filter, bbpress gives you the input and you return the output. In this case:
<?php
/*
Plugin Name: Title Modifier
Author: You
*/
add_filter('bb_title', 'titlemodify');
function titlemodify( $title ) {
//your code that does something to $title;
return $title;
}
?>
Paste this into an empty text file, save it as whateveryouwant.php, edit the code so it actually does something with $title, then upload and activate.
Awesome - I will let you know how it goes. Thanks!
You must log in to post.