here is a fix if you show activity stream on home page
-
If you show BuddyPress activity on your blog homepage (which you can do by going to Settings->Reading in the WP admin and set a static front page as Activity Stream) then in the blog listings the url for the main blog will go to the home page, which is not a blog any longer it is activity feed. this small code will correct that so in the blog listings it goes to the blog page:
// FIX MAIN BLOG LINK IN BUDDYPRESS BLOG DIRECTORY
function fix_main_blog_link( $permalink ) {
if ( ‘page’ == get_option(‘show_on_front’) && $permalink == bp_get_root_domain().’/’ ) {
return get_permalink( get_option(‘page_for_posts’) );
}
return $permalink;
}
add_filter( ‘bp_get_blog_permalink’, ‘fix_main_blog_link’ );This might be a bug, so i might submit it to trac, not sure.
- The topic ‘here is a fix if you show activity stream on home page’ is closed to new replies.