Here is a solution that works in BuddyPress 1.6. This will prevent new activities from being added and will also prevent the user from showing as recently active. The first option is for admins, the second is for a specific username.
`
// Don’t record activity by the site admins or show them as recently active
function my_admin_stealth_mode(){
if ( is_site_admin() ) {
global $bp;
remove_action(‘wp_head’,’bp_core_record_activity’);
delete_user_meta($bp->loggedin_user->id, ‘last_activity’);
}
}
add_action(‘init’,’my_admin_stealth_mode’);
// Don’t record activity for a user or show them as recently active
function my_user_stealth_mode(){
$current_user = wp_get_current_user();
if(is_user_logged_in()) {
if(‘YourUsername’ == $current_user->user_login) {
remove_action(‘wp_head’,’bp_core_record_activity’);
delete_user_meta($current_user->ID, ‘last_activity’);
}
}
}
add_action(‘init’,’my_user_stealth_mode’);
`
Awesome, thank you for the great support that you provide.
I am trying to get away from using the top admin bar and having to go to the dashboard to access the posts, comments and media. So I was able to add the link within your file so that when you logged in you would see the link.
Below is some of the code I added to your bp-profile-menu.php menu structure between line 33 and 59 sub menu items.
$items .= '<li id="menu-item" class="menu-item"><a href="http://thevillageblog.com/wp-admin/edit.php">My Articles</a></li>';
**NOTE: trying to include the code in this post but it shows as html instead of text. If you want I can email the code to you or is there another way to include code in a post and show it as text?
I tried the same concept using the menu panel instead but did not get the same effect. If you have a trick as to how to hide the links until the user has logged in then I would be very grateful. Otherwise the only thing I can think of is to edit your code again which i’d rather not do.
Thanks again for your help.
You should be able to disable the admin bar for logged-out users in the WP admin area by navigating to “Settings > BuddyPress“, then click on the “Settings” tab.
If someone really wanted to find out if you were using BuddyPress, then it would be quite simple. I would take steps to try and hide the fact you were using WordPress first, then move down the ladder to BuddyPress later on.
About notifications without the admin bar, there are some third-party plugins available like:
http://buddydev.com/plugins/buddypress-notifications-widget/ (a widget)
With BP 1.7, we’ll be adding universal theme compatibility, so we’ll be taking some steps to try and make life without the admin bar a little easier.
add_filter(‘show_admin_bar’, ‘__return_false’);
9087877Inactive
I am not certain this is what you desire but check out my blog. I have code snippets that may help you. Read the post and you will understand the end result from the snippet. Have a great day and hope it helps!
http://ezwebdesign.wordpress.com/2012/09/14/removing-admin-bar-removing-dashboard-access/
Hi …I’ve update with the new version of Buddypress…but theToolbar when viewing site …is on …Before I put the code on the function.php like here:
http://codex.buddypress.org/theme-development/modifying-the-buddypress-admin-bar/hiding-the-buddypress-admin-bar/
but I still view the toolbar for every user… only if I go to the single user profile and I unflag the choice: “Show Toolbar when viewing site”. ….but I can’t do for everybody …Iwant it always hide for everyone. ….. Can you help me ????
Thanks
Hi!
Can you kindly share how did you actually do this? I need the same for my site.
1. How did you prevent the friends tab to other users?
2. Have you figured out the way for messages?
regards
Hi all. I would like to have the Buddypress admin bar visible at all times in my site for logged in users, but I want to completely hide the WordPress adminbar from non-admin members (I only want the admins to be able to see it). How can this be achieved? Please bear in mind that my coding skills are very limited, a detailed explanation would be most appreciated.
Thanks in advance, all the best.
Erik.
@shawn38 thanks for your help i figured things out after reading this post i also figured out that the plugin does work you just can’t turn it on or off using the new toolbar so what i did was using the custom file to temporarily activate the old toolbar in order to activate the ninja plugin. thanks again for all your help here and on the other topic!
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-can-i-use-old-buddypress-admin-bar-if-i-dont-want-to-use-this-new-one-in-1-6/
9087877Inactive
Did you wrap the code @mercime gave you in opening and closing php tags? Like this:
`<?php
add_action(“plugins_loaded”,”bpdev_init_sm_mode”);
function bpdev_init_sm_mode(){
if(is_site_admin())
remove_action(“wp_head”,”bp_core_record_activity”); //id SM is on, remove the record activity hook
}
?>`
@rogercoathup thanks for responding sorry for the delay in my response wasn’t getting site updates for a while there. either way would be fine but I’m not very adapt at coding (sql or otherwise). id wait for an update to the plugin but we all know that goes sometimes and it seems like @francescolaffi is off on some kind of extended vacation or sabbatical. actually holding off on upgrading to 1.6 on a client site because of the issue 
You would normally add the code in your theme’s functions.php file
Brajesh I am looking to do the same thing, where do you place that code? I tried members loop but no luck
Hi I was able to edit my wordpress bar a little bit and add some custom links to it through the custom menu and the Admin Bar Improved plugin; but I want to hide those custom links from non-logged in users and don’t know where to begin. Any help?
Do you want to prevent admin activities being created in the first place, or just stop them displaying on certain screens?
If you want to stop them being displayed (and you are comfortable writing SQL) you can add a filter on bp_activity_get_user_join_filter, and modify the where clause to exclude the admin user id
If you want to stop them being created, you could add a hook on bp_activity_add, and delete the activity if the user_id is the admin id.
Anyone know if this is working yet with BP 1.6 i can’t seem to figure it out.
check out this plugin hasn’t been updated in over a year but it worked as of 1.5 (may require you to use the old admin bar under 1.6) we haven’t yet upgraded.
BuddyPress Ninja
Hello,
I’m looking for a way to hide admin activity all over BuddyPress (if possible in multisite too), I tried this (http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-hide-admin-activity-on-buddypress-activity/) but is no longer working in 1.6.
Thanks for any help
Interesting ‘plugin’ that GRA4.. it is a connection to their website. A little more than phoning home. Your members get included into their website. Wherever their ‘plugin’ is activated, all the members show up on all the other websites. They have a plugin for oscommerce, phpbb and wordpress and they are working on a plugin for drupal. All members are gathered to their website and you have NO admin privileges. You have NO control over the content on the website and I don’t know for sure, but I think there could be some major security (and privacy) concerns for all of your website members.
They don’t tell you straight out that you aren’t adding functionality to your WordPress website, they are providing a portal to their website, which shows up on your website making it appear like it’s your website. Quite crafty. – A FACADE-
They are using ‘elgg’ social software on their server. They authenticate using cookies and they secretly provide your website with a ‘secret key’ and their coding changes the .htaccess rewrites for your website to redirect your members to their website. The page they tell you to add, is the same name as the directory of their plugin and the rewrite for permalinks makes it appear that your members are looking at a page, but they are looking at another website. The shortcode they tell you to put on the page you create for their plugin calls the function that imports the data from their website to display on that page. So, basically.. it’s an interface with their website gra4.com. Their website shows up on an ip address in the United States, but they are Russian (no prejudice, just an observation), to share the information. Part of their coding calls a another website virturossiya.org/c (which shows up as ‘GRA4SetConfigValue(‘GRA4_remote_url’… in one of the files. That website also shows up on an ip in the USA, but the page title is in Russian and the favicon is a red star. (looking at that last domain name I can see ‘virtual russia’).
In conclusion, from my perspective, it’s a scam. You do NOT get your own social network with their ‘plugin’, you get to include your members into their website, without your members knowing it.. I don’t think that would be consistent with the spirit of WordPress or BuddyPress. I would stick with BuddyPress or one of the other true WordPress plugins that provide social networking within WordPress, unless you want to find yourself answering questions you have no answer for sometime in the future.. Let alone the risk of your own website and hosting information somehow being hacked. The concern I have is, if they are being honest, why hide all of this from WordPress users of their plugin? With their obvious ability to rewrite and redirect, who knows (really) where your website and member information is going?
If they do get back into the WordPress Repository, I would really be careful of these people. Always check to see if a plugin requires a connection with remote servers before you consider using a plugin.
Hi, I would like to hide or remove the activity link in the buddypress drop-down menu how do I do that? Or maybe make it only view-able by admin? Any helps would be appreciated. Beforehand Thanks!
My website is, http://buddygalaxy.com.
Hello all,
This might be a weird question – but I will try to explain the best I can – Basically I want to disable the option to leave the group (only on specific groups). The reason is because when a user registers for my site they have to select the location of where they are from which then puts them into that group accordingly, but I do not want them to be able to leave the group because this is how the content is filtered.
I have been looking at this block of code –
if ( $group->is_member ) {
// Stop sole admins from abandoning their group
$group_admins = groups_get_group_admins( $group->id );
if ( 1 == count( $group_admins ) && $group_admins[0]->user_id == bp_loggedin_user_id() )
return false;
$button = array(
'id' => 'leave_group',
'component' => 'groups',
'must_be_logged_in' => true,
'block_self' => false,
'wrapper_class' => 'group-button ' . $group->status,
'wrapper_id' => 'groupbutton-' . $group->id,
'link_href' => wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ),
'link_text' => __( 'Leave Group', 'buddypress' ),
'link_title' => __( 'Leave Group', 'buddypress' ),
'link_class' => 'group-button leave-group',
);
I see here this is basically showing the Leave Group button, I got it to the point where I could hide the Leave Group button on the actual Group page, but it’s hiding it for all of them – Basically I need it for a specific group.
Thanks for any help in advance.
‘add_filter(‘show_admin_bar’, ‘__return_false’);` in your functions.php file to turn off fully.
Alternatively, you can use:
‘Settings > BuddyPress : Toolbar Show the Toolbar for logged out users’
You can also select to show or hide the WordPress admin bar on your own profile.
If none of those work for you then you may need to look see if your theme is forcing something.
Hi Charlietech, the BuddyPress admin bar is now merged with the WordPress one.
So, you can use this:
‘add_filter(‘show_admin_bar’, ‘__return_false’);` in your functions.php file to turn off fully.
Alternatively, you can use:
‘Settings > BuddyPress : Toolbar Show the Toolbar for logged out users’
You can also select to show or hide the WordPress admin bar on your own profile.
If none of those work for you then you may need to look see if your theme is forcing something.
Just a slight point on top though, if possible can you only start one thread per question as it does help to focus responses?
Hi everyone,
I would like to create a custom menu using the links found on the Buddypress admin bar (so I can just hide the admin bar and place the menu somewhere else). Is there a way to do this? Is there a plugin/widget that can do this? I’ve been googling for hours but to no avail.
I’m kinda new to WordPress/Buddypress so please bear with me. Thank you.
Can anyone help me?
I’m trying to filter the activity stream so that it only displays ‘published’ forum topics and replies.
I’m using bbPressModeration, which marks all forum topics and posts as ‘pending’, until the administrator approves and publishes the content. The problem is that pending content still appears in the activity stream.
I’m using the code below for my custom activity stream.
`
<?php
/* = Generate Custom Activity Stream
* Place this function anywhere you want to show your custom stream.
* Should accept any of these parameters:
*
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
*/
my_activity_stream(‘per_page=4&page=1&action=new_forum_post,new_blog_comment,new_blog_post,new_forum_topic’);
/* = Custom Activity Stream
* Place this function in bp-custom.php (in your plugins directory)
*/
function my_activity_stream($args ) {
if ( bp_has_activities($args) ) : ?>
<?php endif;
wp_reset_query();
}
`