Skip to:
Content
Pages
Categories
Search
Top
Bottom

here is a fix if you show activity stream on home page


  • Dwenaus
    Participant

    @dwenaus

    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.

Viewing 1 replies (of 1 total)

  • justvinnie
    Participant

    @justvinnie

    After setting my Reading preference to Activity, my home page displays, “not found”. I think your above comment corrects that but I don’t understand. Can you please specify which .php documents and line I’m suppose to insert that code (if it’s even for my issue). Thank you so much.

Viewing 1 replies (of 1 total)
  • The topic ‘here is a fix if you show activity stream on home page’ is closed to new replies.
Skip to toolbar