BuddyDev

Search

Replies

  • Participant
    Level: Guru
    Posts: 903
    Tosin on in reply to: Display sitewide activity for followers only #14393

    I also changed my theme to wordpress tweenty fourteen theme and the problem still occurs.

  • Participant
    Level: Guru
    Posts: 903
    Tosin on in reply to: Display sitewide activity for followers only #14389

    I applied the stated code but no changes. Activities are still changing automatically from (following) to (all members) upon clicking on staus update form

  • Participant
    Level: Guru
    Posts: 903
    Tosin on in reply to: Display sitewide activity for followers only #14387

    I also tried this code you provided and I got the same result which is the filter keeps changing back to (all members) when I click on the status update form(what’s new form)

    /**
     * Set default activity directory tab for BuddyPress
     */
    function buddydev_set_default_activity_directory_tab() {
        // If user is not logged in or
        // If the scope is already set, do not do anything ok.
        if ( ! is_user_logged_in() || isset( $_COOKIE['bp-activity-scope'] ) ) {
            return ;
        }
        // additional check for activity dir
        if ( ! bp_is_activity_directory() ) {
            return ;
        }
        $tab = 'following'; // 'all', 'friends', 'groups', 'mentions'
        // Set scope to our needed tab,
        // In this case, I am setting to the 'friends' tab
        setcookie( 'bp-activity-scope', $tab,null, '/' );
        $_COOKIE['bp-activity-scope'] = $tab;
    }
    add_action( 'bp_template_redirect', 'buddydev_set_default_activity_directory_tab' );
  • Participant
    Level: Guru
    Posts: 903
    Tosin on in reply to: Display sitewide activity for followers only #14385

    Hello

    Thank you for the code, I am using the latest update of buddypress follow from gith hub. I applied your code and it worked successfully but I noticed a problem which was when I logged into the site wide activities page the activities being displayed were that of users im following, but when I wanted to post a status update by clicking on status update form the activity tab filter automatically changed back to (all members) without clicking on the all members tab.

    I would like to disable the (all members) tab totally, if possible to remove it.

  • Participant
    Level: Guru
    Posts: 903

    Ok this will work, all I have to do is create a new custom user role and automatically assign the role with the necessary member types. So when a new user registers as either a brand or business his role will automatically be registered as the custom role. You can paste the code.

    Thank you very much for your help I really appreciate your effort.

  • Participant
    Level: Guru
    Posts: 903

    Ok thanks

    Alternatively, what about removeing the friend tab in the navigation menu and drop down menu for one or more specific member types. This should solve the problem

  • Participant
    Level: Guru
    Posts: 903

    This worked perfectly.

    After applying the code I just came to the realization that the problem is solved half way because the button does not show up but the friend tab in the navigation bar still shows. I should have realized this from the begining.

    So what do you think about disableing the actual buddypress friendship component for one or more specific member types.

    Also thank you for tremendous support!!!

  • Participant
    Level: Guru
    Posts: 903

    Is it possible to add more than one member type like business, brand, organization?

  • Participant
    Level: Guru
    Posts: 903

    Thank very very much you are a life saver.

    It worked perfectly, I am indebted to you, you are God sent.

    I would really appreciate it if you can share this code to others on your blog. There might be other people having similar problems.