Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activity comments not visible to logged out users

  • @lucadgg

    Participant

    Hello,
    I noticed that on http://social.adormo.com/ you won’t see any comment to activity messages unless you are logged in.
    You can see the difference by logging in via FaceBook and then seeing all the comments.

    I can’t find a solution online, any idea?

    Thanks!

    Luca

Viewing 2 replies - 1 through 2 (of 2 total)
  • @megainfo

    Participant

    Hi @lucadgg,

    Add the code to functions.php of your current theme.

    
    /** this code hide comments for no logged in users*/
    add_filter( 'bp_activity_get_comment_count' , 'bp_only_loggedin_can_see_comments', 10,1 );
    function bp_only_loggedin_can_see_comments( $count ){
      if ( !is_user_logged_in() )
         $count = 0;
     
       return $count;
    }
    

    https://gist.github.com/dzmounir/8373632

    @lucadgg

    Participant

    Hi @megainfo,
    This code seems to HIDE the comments to non logged in users.
    What I need is to SHOW the comments to non logged in users, which is something I’d expect to be by default.
    Thank you
    Luca

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Activity comments not visible to logged out users’ is closed to new replies.
Skip to toolbar