Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove Sitewide Activity


  • bojanski
    Member

    @bojanski

    What’s the easiest way to completely remove the Sitewide Activity tab!? Which php file should be modified for that!?

    Thanks

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

  • paulhastings0
    Participant

    @paulhastings0

    Here’s what you’re looking for: http://shabushabu.eu/reordering-buddypress-group-tabs/


    bojanski
    Member

    @bojanski

    Hi,

    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!

    Any ideas!?
    Thanks
    Bojan


    bojanski
    Member

    @bojanski

    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”


    Roger Coathup
    Participant

    @rogercoathup

    @bojanski

    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.


    Roger Coathup
    Participant

    @rogercoathup

    @tom_taylor_85

    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


    bojanski
    Member

    @bojanski

    Hi guys!
    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….

    Thanks
    Bojan


    Roger Coathup
    Participant

    @rogercoathup

    In your child theme (assuming it follows a similar structure to bp-default):

    Edit your /activity/index.php file to remove the tab


    Boone Gorges
    Keymaster

    @boonebgorges

    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/


    bojanski
    Member

    @bojanski

    Thank you all! I’m going to try that…


    thelandman
    Participant

    @thelandman

    @bojanski,

    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=&quot;" title=""></a></li>

    Remove that code and you should be good to go.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove Sitewide Activity’ is closed to new replies.
Skip to toolbar