Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Change /blog title


Burt Adsit
Participant

@burtadsit

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.

Skip to toolbar