Skip to:
Content
Pages
Categories
Search
Top
Bottom

filter sitewide activity stream by specific group

  • Avatar of studioleland
    studioleland
    Participant

    @northcreatif

    I have been searching the forums night and day for a way to hack the main activity page so that it will only show the activity for 1 group in particular. How can I accomplish this? It seems the codex bp_has_activities() is out of date?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of studioleland
    studioleland
    Participant

    @northcreatif

    Or filter by a specific user (ie admin) for use as an announcements page.

    Avatar of studioleland
    studioleland
    Participant

    @northcreatif

    Okay I have pieced it together – Here we are.

    Place the following code in your child-theme functions file:

    function announce_group_by_default( $query_string ) {
    global $bp;
    if ( !$query_string )
    $query_string = '';
    if ( ($bp->current_component == BP_ACTIVITY_SLUG || !$bp->current_component) ) {
    if ( strpos( $query_string, 'action' ) == 0 )
    $query_string .= '&type=activity_update&object=groups&primary_id=2';
    }
    return $query_string;
    }
    add_filter( 'bp_dtheme_ajax_querystring', 'announce_group_by_default' );

    Avatar of studioleland
    studioleland
    Participant

    @northcreatif

    Apparently I cant figure out how to comment the “code” lol. It’s all there.

    Avatar of cavamondo
    cavamondo
    Participant

    @cavamondo

    So the function in place .. how do you call it?

    Avatar of studioleland
    studioleland
    Participant

    @northcreatif

    you place that in your functions.php file in the child theme directory.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.