Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to have friends Activity on profile page


  • Kieran
    Participant

    @cozzie

    Hi there

    I’m trying to change the Profile page so that it shows Friends Activity rather than Personal activity.

    In /wp-content/bp-themes/bpmember/profile/index.php I changed this line:

    <?php if ( bp_has_activities( ‘type=personal&max=10’ ) ) : ?>

    to this:

    <?php if ( bp_has_activities( ‘type=friends&max=10’ ) ) : ?>

    But the activity still shows up as the user’s activity not that of their friends.

    Can anyone help me?

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

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    The way that bp_has_activities is now, you won’t be able to show your friends activity on your own profile page. There’s a few checks to change the type to “personal” if you are viewing your own page or if the current action is “just-me”.

    You could, however, duplicate the function (located in bp-activity-templatetags.php) inside your own functions.php file, remove those checks, and call your custom function instead of this one?

    Is this something we could ticket as an enhancemnt patch? Can’t see why we shouldn’t be able to use this function like this.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Is this something we could ticket as an enhancemnt patch? Can’t see why we shouldn’t be able to use this function like this.

    Done

    Patch suggestion. – Not approved so don’t expect this to stick later


    Kieran
    Participant

    @cozzie

    Thanks a lot John James

    I tried the patch for bp-activity-templatetags.php but it didn’t change things.

    Also tried leaving bp-activity-templatetags.php as it is and adding the patch as a new function in functions.php (bpmember/functions.php) and then calling that function from the profile/index.php but once again the activity remained as personal on profile pages.

    Have I misunderstood your meaning?

    Thanks again!


    r-a-y
    Keymaster

    @r-a-y

    If you’re using John’s patch, you need to add the parameter “override=true”.

    So your updated call should be:

    <?php if ( bp_has_activities( 'type=friends&max=10&override=true' ) ) : ?>

    Try that and give it a shot.


    Kieran
    Participant

    @cozzie

    Great that did it! thanks a lot r-a-y and John James, greatly appreciated!!

    I’ve marked this thread as resolved

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to have friends Activity on profile page’ is closed to new replies.
Skip to toolbar