Remove Sitewide Activity
Here’s what you’re looking for: http://shabushabu.eu/reordering-buddypress-group-tabs/
thanks, nice article! But this is not really what I’m looking for…
I just need to remove the Sitewide Activity (all members activity) under the main Activity page!
I figure it out by myself:
Modify the line #116 within bp-activity-classes.php
Change “a.hide_sitewide = 0” to “a.hide_sitewide = 1”
I would change that back. That doesn’t disable it, that is just telling your BP to show 0 recent activities. The easiest ever is to go to your wp-admin!
Look at the pic, change the first option to disabled!
hide_sitewide is a boolean, and in this line is being used to test whether an activity item has been marked as hidden or not – (it’s not a count @tom_taylor_85)
You should NOT be modifying the code there – that’s a core file, and you’ll run into problems when you upgrade if you’ve modified them. You’ve also changed the logic to say: if an item is marked as hidden get it to display – which is not what you want.
@bojanski – can you be clearer about what you mean by “remove sitewide activity tab” – do you mean you want to remove the main Activity page from the main nav bar?
If the latter – edit it out in header.php in your child theme.
Oh, sorry, i misread his post. I did not realize that it was a core file, using arrays and all that. I saw it was a count the first time
Like I said, remove the site wide activity on your wp-admin. When you disable it, it takes off the activity tab, and it disables updates being posted to an activity stream. http://i56.tinypic.com/n4tgjo.png
your solution (using the admin panel setting) turns off all activity stream posting.
The original poster only wants to remove the Sitewide Activity tab, and I assume wants to keep activity streams within profiles, etc.
The best solution is just to remove this tab from the main nav bar, is to edit the header.php file appropriately
Thank you all for your feedbacks.
No. I just want to disable the “Site-Wide” or “All Members” activity tab (the first one) from the Activity Page itself.
But I want to keep the rest, for example: the Group Activity, Friends Activity….
In your child theme (assuming it follows a similar structure to bp-default):
Edit your /activity/index.php file to remove the tab
As @rogercoathup suggested, you should open up header.php in your child theme, find the code that creates the Activity tab, and delete it.
If you don’t yet have header.php in your child theme, you’ll have to copy it here. More on BP child themes: https://codex.buddypress.org/extending-buddypress/building-a-buddypress-child-theme/
Here is the code you are looking for, you’ll find it under /wp-content/themes/yourtheme/activity/index.php around line 22. This is presuming you have created a child theme based on the default BP theme.
<li class="selected" id="activity-all"><a href="" title=""></a></li>
Remove that code and you should be good to go.
- The topic ‘Remove Sitewide Activity’ is closed to new replies.