BuddyDev

Search

[Resolved] BuddyPress admin Actvity hide

Tagged: , ,

  • Participant
    Level: Enlightened
    Posts: 39
    yuriix on #47318

    Hello,
    Until recently I used to use the feature below to hide admin activity, but suddenly it stopped working. Do you know what it could be?

    /**
    //BuddyPress admin Actvity Disable
    */
    add_filter( ‘bp_after_has_activities_parse_args’, function( $args ) {

    if ( ! bp_is_activity_directory() ) {
    return $args;
    }

    $args[‘filter_query’][] = array(
    ‘column’ => ‘user_id’,
    ‘value’ => ‘1,2’, // Replace by your user ids.
    ‘compare’ => ‘NOT IN’,
    );

    return $args;
    } );

    Thank you
    Regards

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #47321

    Hi,
    Thank you for the question.

    Please share your BuddyPress version and any changes you have made recently.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 39
    yuriix on #47330

    Hello,
    I’m sorry, I wrote it wrong. I use plugin BuddyPress Activity ShortCode for show Aktivities.

    [activity-stream role=editor,author,contributor,subscriber per_page=6 load_more=3 ]

    Unfortunately, admin activities are also displayed.

    Thank you.
    Regards

  • Participant
    Level: Enlightened
    Posts: 39
    yuriix on #47331

    BuddyPress 10.6.0
    BuddyPress Activity ShortCode 1.1.8

  • Participant
    Level: Enlightened
    Posts: 39
    yuriix on #47332

    So I found out that Admin activity is not displayed, but only imported products, i.e. products that have been imported into Woocommerce are displayed.
    Is it possible to cancel not to show products that have been added to Woocommerce in the activities?

    Thank you

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #47338

    Hi yuriix,
    It is good to know that the code is working.

    I am sorry, The activity shortcode does not have anything to do with the WooCommerce products. Are you using any integration for recording activity of Woo products?

    I will suggest disabling some of your addons and testing it.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 39
    yuriix on #47352

    Hello,
    I figured it out.
    For WP All Import – when importing you need to add the Author ID.

    Solved 🙂
    Regards

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #47354

    Thank you.
    That’s good to know.

    Regards
    Brajesh

The topic ‘ [Resolved] BuddyPress admin Actvity hide’ is closed to new replies.

This topic is: resolved