Social Theme (Remove Activity for Non-Logged In users)

I am using the Social Theme for BuddyPress. I am trying to get the look as close to facebook as possible for demo purposes.

I do not want the activity stream to show for non-logged in users. How would I accomplish this.


  • aecnu
    • WP Unicorn

    Greetings whardson,

    Thank you for this great question.

    I have researched trying to do this via Buddy press options etc. and though I certainly do not know everything, I have come to the conclusion that it cannot be done natively nor find a way to do it natively.

    Therefore the next thing I would do if Buddy Press does not have a solution themselves I would try the Advanced Access Manager plugin.

    Let me know how it goes if you try it out.

    Cheers, Joe

  • whardson
    • WPMU DEV Initiate

    It is hard coded in your theme. If you look at other BuddyPress themes like Frisco they do not have this in there. Can you ask someone else. I know it can be done and something that is really missing.

    I just assumed that it would be an easy fix as most social networks do not show member activity for non-logged in users.

  • aecnu
    • WP Unicorn

    Greetings whardson,

    Thank you for your additional input, it is greatly appreciated.

    As you requested I will therefore see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Jeffri
    • Front End Developer

    Hi whardson,

    Sorry for the delay to getting back to you.

    To remove activity stream for non-logged in users, please follow the step I outlined below.

    First of all, you have to use child theme and place the modified code in there. To do that, please copy the folder /wp-content/themes/bp-social/themes/bp-social-child to /wp-content/themes/bp-social-child. You will now see a new theme in WordPress theme selection screen called BuddyPress Social Child, please activate it.

    Then, please copy the following file from the main theme to child theme:

    /wp-content/themes/bp-social/activity/index.php to

    Open the copied file with your preferred text editor and find line 10, that look like this:

    get_header( 'buddypress' ); ?>

    Change it to:

    get_header( 'buddypress' ); ?>
    <?php if ( is_user_logged_in() ): ?>

    We added the beginning of conditional check for logged in user, this need to be closed. So next, find this line at the bottom of the file:

    <?php get_sidebar( 'buddypress' ); ?>

    Change it to:

    <?php get_sidebar( 'buddypress' ); ?>
    <?php endif ?>

    Now the activity stream will be hidden from non-logged in user.

    You might also want to change the navigation to appear differently between logged in and non-logged in user, to do this please go to Appearance -> Menu and select the menu you would like to use.

    Also note that we just updated Social theme to that includes BuddyPress 1.6 features, so make sure to update before making this changes. :slight_smile:

    Let me know if you have any other question.

    Thank you.


  • Tom Eagles
    • Syntax Hero

    hi @whardson

    Some of the things here are customisation of the theme, and as such really arent part of the support here which is basically getting the plugins and themes to work as they were intended.

    For bits and pieces like this you will need to be able to understand php css and html, for example you could take @Jeffri 's code and then look how the page is generated and then modify that to how you need it.

    This is pretty much the same answer you would get from any theme developer / publisher. I have seen even less support on some other sites where anything other than the template or plugin wasnt related to a bug then the authors answer was "sorry that is customising the theme we dont support that"

    If you are going to edit code just make sure you backup the original first. edit a copy and upload that.

    Just one thing to keep in mind that anything like jeffri's solution to your problem wasnt a problem with the theme as it was working as it was designed to, but rather a change to the code to match your needs. And that relies on the good nature of those helping. But overall WPMUDEV goes way beyond those guidelines again and again.

  • aecnu
    • WP Unicorn

    Greetings whardson,

    Thank you for your feedback, it is appreciated.

    Yes I helped you out earlier with a quick custom coding from the lead developer, but that was truly out of the scope of our mission here at WPMU Dev and that is the extent of the custom coding we are doing here in this ticket.

    Give an inch .... and you want to take a mile.

    Here write my Boss about that I helped you out with lead developer assistance on a small issue and now you want us to custom code your entire front page.

    Direct your concerns to our contact form here:

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.