You want to change the title of the page in the browser? I think that’s what you are asking. Each page has a different title based on what it is and what it contains.
If all you want to do is change the title to the same thing on your site then that is located in the /bpmember/header.php file on line 7 – <title><?php bp_page_title() ?></title>
If you want to change the title to something else based on what page is being viewed then you’ll have to either alter the core code, which isn’t a good idea, or install a filter.
The title for each page is determined by the function bp_page_title() in bp-core-templatetags.php
At the bottom of that function bp calls a filter so that you can change the title without altering either header.php or bp_page_title(). You can install a filter by creating one in your bp-custom.php file like this:
function my_page_title($with_site_name, $without_site_name){
return ‘my page title’;
}
add_filter(‘bp_page_title’, ‘my_page_title’, 10, 2);
The parameters that get passed to your new filter are the page titles with and without the site name that the bp_page_title() function is going to use as the page title. Whatever you return from that function will be the page title for *all* pages that use the bp home theme.
Thanks Burt. I found it. The one i want to change is this one
} else {
$title = __( ‘Blog’, ‘buddypress’ );
from bp-core-templatetags.php bp_page_title() function. Thanks much
lol. You had absolutely no need for all that other stuff then. Now you know more than you ever wanted to know about page titles in bp.
Interesting post. What if I don’t want to change the names of the different parts in the page title, but the order of these parts?
E.g. standard: “Sitename – Blog – Post” changed to “Post – Blog – Sitename”
Would that be possible with such a filter?
zenimot, by the time the filter gets it the title string is set. You’ll have to parse the string to rearrange things. Or just replace the functionality of bp_get_page_title() inside your filter to arrange things as you want.
The title will be whatever your filter returns.
@Amhyaut
It seems that you are wanting to change the slug “blog” to something else. Read this article and see if this is what you’re after:
https://buddypress.org/blog/how-to/customizable-slugs-in-buddypress/
I just want to change the default “My Blog” to my own site name. Are there actually no settings for editing the main pages? does one have to edit php just for that?