Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Rename sitewide page headers so “Blog” doesn't appear


Brajesh Singh
Participant

@sbrajesh

doh! I missed while modifying the bp_page_title

But the global line as

global $bp,$current_blog,$post;

So the modified code for function looks like

function bpdev_blog_title($complete_title,$title_old)
{//hack page title for single article
global $bp,$current_blog,$post;
if ( bp_is_blog_page() ){
if ( is_single() ){
$title = __( $post->post_title, 'buddypress' );

if ( defined( 'BP_ENABLE_MULTIBLOG' ) ) {
$blog_title = get_blog_option( $current_blog->blog_id, 'blogname' );
} else {
$blog_title = get_blog_option( BP_ROOT_BLOG, 'blogname' );
}
return $blog_title . ' | ' . esc_attr( $title );
}
}

return $complete_title;
}

Skip to toolbar