Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Sub blogs display name of home blog


Brajesh Singh
Participant

@sbrajesh

Gald It worked.

I see you have buddypress Installed on main site /center and enabled on the blogs using the config.

so, that’s why, It is showing the main site.

anyway, you can manage that using conditional like this

<?php
global $current_blog;
if($current_blog->blog_id != BP_ROOT_BLOG){
//remove action which was registerd by buddypress
remove_action( 'bp_adminbar_logo', 'bp_adminbar_logo' );

}

//add your own action here
add_action( 'bp_adminbar_logo', 'my_blog_logo' );

function my_blog_logo() {
echo '<a href="' . get_bloginfo('home') . '" id="admin-bar-logo">' . get_option('blogname') . '</a>';
}
?>

That should do it.

Skip to toolbar